flvdec: fix creation of lots of phantom data streams
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 2 Sep 2012 03:01:08 +0000 (05:01 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 2 Sep 2012 03:04:14 +0000 (05:04 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/flvdec.c

index 822f381..c7b6922 100644 (file)
@@ -720,8 +720,9 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt)
                 flv_same_video_codec(st->codec, flags)) {
                 break;
             }
-        } else if (st->id == stream_type) {
-            break;
+        } else if (stream_type == FLV_STREAM_TYPE_DATA) {
+            if (st->codec->codec_type == AVMEDIA_TYPE_DATA)
+                break;
         }
     }
     if(i == s->nb_streams){