[4/8] rtpenc_chain: Pass the latm option through, if set on the source format

Message ID 1305893640-56569-5-git-send-email-martin@martin.st
State Superseded
Headers show

Commit Message

Martin Storsjö May 20, 2011, 12:13 p.m.
---
 libavformat/rtpenc_chain.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

Patch

diff --git a/libavformat/rtpenc_chain.c b/libavformat/rtpenc_chain.c
index 1727740..a024a0f 100644
--- a/libavformat/rtpenc_chain.c
+++ b/libavformat/rtpenc_chain.c
@@ -23,6 +23,7 @@ 
 #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)
@@ -49,6 +50,11 @@  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);
+    if (s->oformat->priv_class && av_find_opt(s->priv_data, "latm", NULL, 0, 0))
+        av_set_int(rtpctx->priv_data, "latm",
+                   av_get_int(s->priv_data, "latm", NULL));
+
     /* Set the synchronized start time. */
     rtpctx->start_time_realtime = s->start_time_realtime;