[FFmpeg-cvslog] rtpenc_chain: Use the original AVFormatContext for getting payload type

Martin Storsjö git at videolan.org
Tue Feb 5 16:32:59 CET 2013


ffmpeg | branch: release/1.1 | Martin Storsjö <martin at martin.st> | Wed Jan 23 23:25:09 2013 +0200| [a856623e87d34f21915b51d1d4032be0330d7bfb] | committer: Martin Storsjö

rtpenc_chain: Use the original AVFormatContext for getting payload type

In ff_rtp_get_payload_type, the AVFormatContext is used for checking
whether the payload_type or rtpflags options are set. In rtpenc_chain,
the rtpctx struct is a newly initialized struct where no options have
been set yet, so no options can be fetched from there.

All muxers that internally chain rtp muxers have the "rtpflags" field
that allows passing such options on (which is how this worked before
8034130e06), so this works just as intended.

This makes it possible to produce H263 in RFC2190 format with chained
RTP muxers.

CC: libav-stable at libav.org
Signed-off-by: Martin Storsjö <martin at martin.st>
(cherry picked from commit 4a4a7e138c92901e04db46a6b05cc6948023e5f5)

Signed-off-by: Martin Storsjö <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a856623e87d34f21915b51d1d4032be0330d7bfb
---

 libavformat/rtpenc_chain.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/rtpenc_chain.c b/libavformat/rtpenc_chain.c
index 3c297eb..935dd6c 100644
--- a/libavformat/rtpenc_chain.c
+++ b/libavformat/rtpenc_chain.c
@@ -62,7 +62,7 @@ int ff_rtp_chain_mux_open(AVFormatContext **out, AVFormatContext *s,
     /* Get the payload type from the codec */
     if (st->id < RTP_PT_PRIVATE)
         rtpctx->streams[0]->id =
-            ff_rtp_get_payload_type(rtpctx, st->codec, idx);
+            ff_rtp_get_payload_type(s, st->codec, idx);
     else
         rtpctx->streams[0]->id = st->id;
 



More information about the ffmpeg-cvslog mailing list