Do not read strd chunk in avi files as H264 extradata.

Fixes ticket #2561.
(cherry picked from commit 231b331718)
This commit is contained in:
Carl Eugen Hoyos
2013-05-13 12:39:44 +02:00
parent 33d699a4e7
commit 79a3f364dd

View File

@@ -706,7 +706,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);