This fixes crashes with muxing H263 into RTSP.

CC: [email protected]
---
 libavformat/rtp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/rtp.c b/libavformat/rtp.c
index dfe97de..d1c6ed0 100644
--- a/libavformat/rtp.c
+++ b/libavformat/rtp.c
@@ -104,7 +104,7 @@ int ff_rtp_get_payload_type(AVFormatContext *fmt,
     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 ||
-                !fmt->oformat->priv_class ||
+                !fmt->oformat->priv_class || !fmt->priv_data ||
                 !av_opt_flag_is_set(fmt->priv_data, "rtpflags", "rfc2190")))
                 continue;
             /* G722 has 8000 as nominal rate even if the sample rate is 16000,
-- 
1.7.9.4

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to