return eof/error if only ffm header has been written, should fix #815
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>
Sun, 1 Feb 2009 22:02:57 +0000 (22:02 +0000)
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>
Sun, 1 Feb 2009 22:02:57 +0000 (22:02 +0000)
Originally committed as revision 16924 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/ffmdec.c

index 03b7bd8..9951d75 100644 (file)
@@ -359,6 +359,9 @@ static int ffm_read_packet(AVFormatContext *s, AVPacket *pkt)
     FFMContext *ffm = s->priv_data;
     int duration;
 
+    if (url_fsize(s->pb) == FFM_PACKET_SIZE)
+        return -1;
+
     switch(ffm->read_state) {
     case READ_HEADER:
         if (!ffm_is_avail_data(s, FRAME_HEADER_SIZE+4)) {