aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/rtp.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2013-01-23 21:38:41 +0200
committerMartin Storsjö <martin@martin.st>2013-01-23 23:30:58 +0200
commite90820d4f815c15796e642467cdddbad755212a2 (patch)
tree205b1ae6e7ffe3ab434f274bd9307341d9b1eb23 /libavformat/rtp.c
parentcf29f49d8ae00bb153c24b5c8a8f6cb150a91de8 (diff)
downloadffmpeg-e90820d4f815c15796e642467cdddbad755212a2.tar.gz
rtp: Make sure priv_data is set before reading it
This fixes crashes with muxing H263 into RTSP. CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtp.c')
-rw-r--r--libavformat/rtp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/rtp.c b/libavformat/rtp.c
index dfe97dec97..d1c6ed09aa 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,