Do not read strd chunk in avi files as H264 extradata.
[ffmpeg.git] / libavformat / avidec.c
index 2066c18f651ba9ba4cf9fa718ba3802f8807c636..b80effc33cdf048153bf8f5f16b53f85b74b2bde 100644 (file)
@@ -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);