Commit 231b3317 authored by Carl Eugen Hoyos's avatar Carl Eugen Hoyos

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

Fixes ticket #2561.
parent 4383e1b2
......@@ -713,7 +713,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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment