Fix demuxing of AVIs with pad streams.
authorKostya Shishkov <kostya.shishkov@gmail.com>
Thu, 6 Apr 2006 03:33:10 +0000 (03:33 +0000)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Thu, 6 Apr 2006 03:33:10 +0000 (03:33 +0000)
Originally committed as revision 5271 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/avidec.c

index f491878..d7830b8 100644 (file)
@@ -290,6 +290,9 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
 
             if (stream_index >= s->nb_streams) {
                 url_fskip(pb, size - 8);
+                /* ignore padding stream */
+                if (tag1 == MKTAG('p', 'a', 'd', 's'))
+                    stream_index--;
                 break;
             }
             st = s->streams[stream_index];