diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-09-25 16:11:34 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-09-25 16:11:34 +0200 |
commit | abcaacf1acb4c7d7c2df5718fd56a714d4998305 (patch) | |
tree | e1d7a138ddab9f9863d792719aa349a73f79f2fa /libavformat | |
parent | d3ef2da59df2bf65bea0ae7b519625c51c6f21dc (diff) | |
parent | 7a1a9dd56cb4cafad054bf6d65b21bb24d31c544 (diff) | |
download | ffmpeg-streaming-abcaacf1acb4c7d7c2df5718fd56a714d4998305.zip ffmpeg-streaming-abcaacf1acb4c7d7c2df5718fd56a714d4998305.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
pthread: make sure AVFrame.extended_data is set properly.
libfdk-aac: reindent after last commit
libfdk-aac: Limit to supported sample rates.
cbrt_tablegen: Include libm.h
oggparsetheora: make it more robust
ogg: prevent NULL pointer deference in theora gptopts
Conflicts:
libavformat/oggparsetheora.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/oggparsetheora.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/libavformat/oggparsetheora.c b/libavformat/oggparsetheora.c index 4810357..6bea4ec 100644 --- a/libavformat/oggparsetheora.c +++ b/libavformat/oggparsetheora.c @@ -53,7 +53,8 @@ theora_header (AVFormatContext * s, int idx) os->private = thp; } - if (os->buf[os->pstart] == 0x80) { + switch (os->buf[os->pstart]) { + case 0x80: { GetBitContext gb; int width, height; AVRational timebase; @@ -109,9 +110,16 @@ theora_header (AVFormatContext * s, int idx) st->codec->codec_type = AVMEDIA_TYPE_VIDEO; st->codec->codec_id = AV_CODEC_ID_THEORA; st->need_parsing = AVSTREAM_PARSE_HEADERS; - - } else if (os->buf[os->pstart] == 0x81) { - ff_vorbis_comment (s, &st->metadata, os->buf + os->pstart + 7, os->psize - 8); + } + break; + case 0x81: + ff_vorbis_comment(s, &st->metadata, os->buf + os->pstart + 7, os->psize - 8); + case 0x82: + if (!thp->version) + return -1; + break; + default: + return -1; } st->codec->extradata = av_realloc (st->codec->extradata, |