]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/hcom.c
avcodec/codec, allcodecs: Constify the AVCodec API
[ffmpeg] / libavformat / hcom.c
index 933ecce373ca8312f3fc1b16d820d7352790585c..3e1e8da236c8021702dbaa37d6768d012bac1bbb 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;