aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2013-01-23 21:38:41 +0200
committerMartin Storsjö <martin@martin.st>2013-01-24 11:56:43 +0200
commit62de693a17f9b107be7867d822d5accacd4be544 (patch)
tree25494e42e274f34e87f73028c4b531676c42a04b
parent1a28948eb3e5aaab1ed5dba7a9bc93b486995954 (diff)
downloadffmpeg-62de693a17f9b107be7867d822d5accacd4be544.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> (cherry picked from commit e90820d4f815c15796e642467cdddbad755212a2) Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r--libavformat/rtp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/rtp.c b/libavformat/rtp.c
index 38b2348d45..9a7d44b0b4 100644
--- a/libavformat/rtp.c
+++ b/libavformat/rtp.c
@@ -108,7 +108,7 @@ int ff_rtp_get_payload_type(AVFormatContext *fmt,
for (i = 0; AVRtpPayloadTypes[i].pt >= 0; ++i)
if (AVRtpPayloadTypes[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,