]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/flic.c
avcodec: add ClearVideo decoder
[ffmpeg] / libavformat / flic.c
index 49f5d21f989a83010e80355069eddce2784c820b..7c62cb423c8a68250cd14ee5af1e2425bd8fc5a5 100644 (file)
@@ -204,7 +204,7 @@ static int flic_read_packet(AVFormatContext *s,
     int ret = 0;
     unsigned char preamble[FLIC_PREAMBLE_SIZE];
 
-    while (!packet_read) {
+    while (!packet_read && !avio_feof(pb)) {
 
         if ((ret = avio_read(pb, preamble, FLIC_PREAMBLE_SIZE)) !=
             FLIC_PREAMBLE_SIZE) {
@@ -256,7 +256,7 @@ static int flic_read_packet(AVFormatContext *s,
         }
     }
 
-    return ret;
+    return avio_feof(pb) ? AVERROR_EOF : ret;
 }
 
 AVInputFormat ff_flic_demuxer = {