changeset 5194:ead0d47f2fb7 libavformat

Make probing for VC1 test bitstream format stricter
author kostya
date Tue, 15 Sep 2009 15:22:36 +0000
parents 360f4a07ce5e
children 006ff72fcb67
files vc1test.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/vc1test.c	Tue Sep 15 14:56:09 2009 +0000
+++ b/vc1test.c	Tue Sep 15 15:22:36 2009 +0000
@@ -33,7 +33,9 @@
 
 static int vc1t_probe(AVProbeData *p)
 {
-    if (p->buf[3] != 0xC5 || AV_RL32(&p->buf[4]) != 4)
+    if (p->buf_size < 24)
+        return 0;
+    if (p->buf[3] != 0xC5 || AV_RL32(&p->buf[4]) != 4 || AV_RL32(&p->buf[20]) != 0xC)
         return 0;
 
     return AVPROBE_SCORE_MAX/2;