43
45
rtpctx->oformat = rtp_format;
44
if (!av_new_stream(rtpctx, 0)) {
46
if (!avformat_new_stream(rtpctx, NULL)) {
50
/* Pass the interrupt callback on */
51
rtpctx->interrupt_callback = s->interrupt_callback;
48
52
/* Copy the max delay setting; the rtp muxer reads this. */
49
53
rtpctx->max_delay = s->max_delay;
50
54
/* Copy other stream parameters. */
51
55
rtpctx->streams[0]->sample_aspect_ratio = st->sample_aspect_ratio;
53
av_set_parameters(rtpctx, NULL);
54
/* Copy the rtpflags values straight through */
55
if (s->oformat->priv_class &&
56
av_find_opt(s->priv_data, "rtpflags", NULL, 0, 0))
57
av_set_int(rtpctx->priv_data, "rtpflags",
58
av_get_int(s->priv_data, "rtpflags", NULL));
57
if (av_opt_get(s, "rtpflags", AV_OPT_SEARCH_CHILDREN, &rtpflags) >= 0)
58
av_dict_set(&opts, "rtpflags", rtpflags, AV_DICT_DONT_STRDUP_VAL);
60
60
/* Set the synchronized start time. */
61
61
rtpctx->start_time_realtime = s->start_time_realtime;
66
66
ffio_fdopen(&rtpctx->pb, handle);
68
68
ffio_open_dyn_packet_buf(&rtpctx->pb, packet_size);
69
ret = avformat_write_header(rtpctx, NULL);
69
ret = avformat_write_header(rtpctx, &opts);