]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/bfi.c
hwcontext_vulkan: dynamically load functions
[ffmpeg] / libavformat / bfi.c
index 29e2cf8cf4193d9151768b727dabdd108106d367..bff6f0154ecb305d078a8fcf628198a46b4ce4d1 100644 (file)
@@ -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);
@@ -171,7 +174,7 @@ static int bfi_read_packet(AVFormatContext * s, AVPacket * pkt)
     return ret;
 }
 
-AVInputFormat ff_bfi_demuxer = {
+const AVInputFormat ff_bfi_demuxer = {
     .name           = "bfi",
     .long_name      = NULL_IF_CONFIG_SMALL("Brute Force & Ignorance"),
     .priv_data_size = sizeof(BFIContext),