[FFmpeg-cvslog] rtp: Make sure the output format pointer is set

Martin Storsjö git at videolan.org
Thu Jan 24 14:27:10 CET 2013


ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Wed Jan 23 23:21:52 2013 +0200| [932117171f32fc3160f3d92943290238945fcb28] | committer: Martin Storsjö

rtp: Make sure the output format pointer is set

Not sure if this actually happens, but we do the same check when
checking payload_type further above in the function, so it might
be needed.

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

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

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

diff --git a/libavformat/rtp.c b/libavformat/rtp.c
index d1c6ed0..e827c2e 100644
--- a/libavformat/rtp.c
+++ b/libavformat/rtp.c
@@ -103,7 +103,7 @@ int ff_rtp_get_payload_type(AVFormatContext *fmt,
     /* static payload type */
     for (i = 0; rtp_payload_types[i].pt >= 0; ++i)
         if (rtp_payload_types[i].codec_id == codec->codec_id) {
-            if (codec->codec_id == AV_CODEC_ID_H263 && (!fmt ||
+            if (codec->codec_id == AV_CODEC_ID_H263 && (!fmt || !fmt->oformat ||
                 !fmt->oformat->priv_class || !fmt->priv_data ||
                 !av_opt_flag_is_set(fmt->priv_data, "rtpflags", "rfc2190")))
                 continue;



More information about the ffmpeg-cvslog mailing list