]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/rtpenc_chain.c
vf_yadif: add an option to enable/disable deinterlacing based on src frame "interlace...
[ffmpeg] / libavformat / rtpenc_chain.c
index a923b2deb64f3746a12b04a210fbb7fb736ed7cc..0fb47f62342096423115eeb685c22966f2c6f0f9 100644 (file)
  */
 
 #include "avformat.h"
+#include "avio_internal.h"
 #include "rtpenc_chain.h"
 #include "avio_internal.h"
+#include "libavutil/opt.h"
 
 AVFormatContext *ff_rtp_chain_mux_open(AVFormatContext *s, AVStream *st,
                                        URLContext *handle, int packet_size)
@@ -48,16 +50,23 @@ AVFormatContext *ff_rtp_chain_mux_open(AVFormatContext *s, AVStream *st,
     /* Copy other stream parameters. */
     rtpctx->streams[0]->sample_aspect_ratio = st->sample_aspect_ratio;
 
+    av_set_parameters(rtpctx, NULL);
+    /* Copy the rtpflags values straight through */
+    if (s->oformat->priv_class &&
+        av_find_opt(s->priv_data, "rtpflags", NULL, 0, 0))
+        av_set_int(rtpctx->priv_data, "rtpflags",
+                   av_get_int(s->priv_data, "rtpflags", NULL));
+
     /* Set the synchronized start time. */
     rtpctx->start_time_realtime = s->start_time_realtime;
 
     avcodec_copy_context(rtpctx->streams[0]->codec, st->codec);
 
     if (handle) {
-        url_fdopen(&rtpctx->pb, handle);
+        ffio_fdopen(&rtpctx->pb, handle);
     } else
         ffio_open_dyn_packet_buf(&rtpctx->pb, packet_size);
-    ret = av_write_header(rtpctx);
+    ret = avformat_write_header(rtpctx, NULL);
 
     if (ret) {
         if (handle) {