]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/hcom.c
hwcontext_vulkan: dynamically load functions
[ffmpeg] / libavformat / hcom.c
index 933ecce373ca8312f3fc1b16d820d7352790585c..b7fb7314c884c5fd219e19225ce37a64fc2bdafa 100644 (file)
 #include "internal.h"
 #include "pcm.h"
 
-static int hcom_probe(AVProbeData *p)
+static int hcom_probe(const AVProbeData *p)
 {
+    if (p->buf_size < 132)
+        return 0;
     if (!memcmp(p->buf+65, "FSSD", 4) &&
         !memcmp(p->buf+128, "HCOM", 4))
         return AVPROBE_SCORE_MAX;
@@ -36,7 +38,7 @@ static int hcom_probe(AVProbeData *p)
 static int hcom_read_header(AVFormatContext *s)
 {
     AVStream *st;
-    unsigned data_size, rsrc_size, huffcount;
+    av_unused unsigned data_size, rsrc_size, huffcount;
     unsigned compresstype, divisor;
     unsigned dict_entries;
     int ret;
@@ -80,7 +82,7 @@ static int hcom_read_header(AVFormatContext *s)
     return 0;
 }
 
-AVInputFormat ff_hcom_demuxer = {
+const AVInputFormat ff_hcom_demuxer = {
     .name           = "hcom",
     .long_name      = NULL_IF_CONFIG_SMALL("Macintosh HCOM"),
     .read_probe     = hcom_probe,