skip empty data packets in flv, fix input.flv
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>
Thu, 2 Apr 2009 03:52:19 +0000 (03:52 +0000)
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>
Thu, 2 Apr 2009 03:52:19 +0000 (03:52 +0000)
Originally committed as revision 18306 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/flvdec.c

index 89ece0f..a279dbe 100644 (file)
@@ -439,6 +439,10 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt)
         }
     }
 
+    /* skip empty data packets */
+    if (!size)
+        return AVERROR(EAGAIN);
+
     ret= av_get_packet(s->pb, pkt, size);
     if (ret <= 0) {
         return AVERROR(EIO);