]> git.sesse.net Git - ffmpeg/commitdiff
avformat/h264dec: Fix detection of invalid h264 with 0x100 startcodes
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 30 May 2015 01:53:32 +0000 (03:53 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 30 May 2015 01:53:32 +0000 (03:53 +0200)
Fies Ticket4325

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/h264dec.c

index 76073dda785f7fa074a25ac97c0816c72a1de11b..4adc234a418c4a0f18056dcc779879ad8e81e610 100644 (file)
@@ -47,8 +47,10 @@ static int h264_probe(AVProbeData *p)
                 return 0;
             if (ref_zero[type] == -1 && !ref_idc)
                 return 0;
-            if (ref_zero[type] == 2)
-                res++;
+            if (ref_zero[type] == 2) {
+                if (!(code == 0x100 && !p->buf[i + 1] && !p->buf[i + 2]))
+                    res++;
+            }
 
             switch (type) {
             case 1: