comparison thp.c @ 2001:1a3c9056982a libavformat

allocate 32 extra bytes at the end of the probe buffer and remove most probe buf_size checks
author michael
date Sun, 08 Apr 2007 11:34:15 +0000
parents deacffc2740e
children cabaa5557164
comparison
equal deleted inserted replaced
2000:ce51095f383b 2001:1a3c9056982a
45 45
46 46
47 static int thp_probe(AVProbeData *p) 47 static int thp_probe(AVProbeData *p)
48 { 48 {
49 /* check file header */ 49 /* check file header */
50 if (p->buf_size < 4)
51 return 0;
52
53 if (AV_RL32(p->buf) == MKTAG('T', 'H', 'P', '\0')) 50 if (AV_RL32(p->buf) == MKTAG('T', 'H', 'P', '\0'))
54 return AVPROBE_SCORE_MAX; 51 return AVPROBE_SCORE_MAX;
55 else 52 else
56 return 0; 53 return 0;
57 } 54 }