diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2013-05-13 12:39:44 +0200 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2013-05-13 14:46:28 +0200 |
commit | 5888e656ceaf81dfd523bb5f9f2a8afbf58485fe (patch) | |
tree | 64f206b45dd38c617228f0110fa99c1088a61b24 | |
parent | 9fef5d55538ca5df06b26268fafc0559b8f9d219 (diff) | |
download | ffmpeg-5888e656ceaf81dfd523bb5f9f2a8afbf58485fe.tar.gz |
Do not read strd chunk in avi files as H264 extradata.
Fixes ticket #2561.
(cherry picked from commit 231b3317184790b6be4b4619d96fd328f13aeabb)
-rw-r--r-- | libavformat/avidec.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 1e71522915..01813e48a7 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -695,7 +695,9 @@ static int avi_read_header(AVFormatContext *s) } break; case MKTAG('s', 't', 'r', 'd'): - if (stream_index >= (unsigned)s->nb_streams || s->streams[stream_index]->codec->extradata_size) { + if (stream_index >= (unsigned)s->nb_streams + || s->streams[stream_index]->codec->extradata_size + || s->streams[stream_index]->codec->codec_tag == MKTAG('H','2','6','4')) { avio_skip(pb, size); } else { uint64_t cur_pos = avio_tell(pb); |