]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/bfi.c
avformat: Remove FFserver leftovers
[ffmpeg] / libavformat / bfi.c
index 0dad658f959a29cb21315d9aaf51f057217ca49f..2dab986f3af75ecf4bc0ca4aab6cb492e616723c 100644 (file)
@@ -39,7 +39,7 @@ typedef struct BFIContext {
     int avflag;
 } BFIContext;
 
-static int bfi_probe(AVProbeData * p)
+static int bfi_probe(const AVProbeData * p)
 {
     /* Check file header */
     if (AV_RL32(p->buf) == MKTAG('B', 'F', '&', 'I'))
@@ -69,6 +69,9 @@ static int bfi_read_header(AVFormatContext * s)
     /* Set the total number of frames. */
     avio_skip(pb, 8);
     chunk_header           = avio_rl32(pb);
+    if (chunk_header < 3)
+        return AVERROR_INVALIDDATA;
+
     bfi->nframes           = avio_rl32(pb);
     avio_rl32(pb);
     avio_rl32(pb);