]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/davs2.c
avformat/spdifenc: fix handling of large TrueHD frames
[ffmpeg] / libavformat / davs2.c
index bca59a3c3fc44b717380e7b7ed4013645c21186f..59f41fd499445a6efc65d3f94dccae4ea9f634a8 100644 (file)
 #define ISUNIT(x) ( ISSQH(x) || ISEND(x) || (x) == 0xB2 || ISPIC(x) || (x) == 0xB5 || (x) == 0xB7 )
 #define ISAVS2(x) ((x) == 0x20 || (x) == 0x22 || (x) == 0x30 || (x) == 0x32 )
 
-static int avs2_probe(AVProbeData *p)
+static int avs2_probe(const AVProbeData *p)
 {
-    if (AV_RB32(p->buf) != 0x1B0){
-        return 0;
-    }
     uint32_t code= -1, hds=0, pic=0, seq=0;
     uint8_t state=0;
     const uint8_t *ptr = p->buf, *end = p->buf + p->buf_size, *sqb=0;
+    if (AV_RB32(p->buf) != 0x1B0){
+        return 0;
+    }
 
     while (ptr < end) {
         ptr = avpriv_find_start_code(ptr, end, &code);