comparison flvdec.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 cf8db4fe9efa
children a3e79d6e4e3c
comparison
equal deleted inserted replaced
2000:ce51095f383b 2001:1a3c9056982a
29 29
30 static int flv_probe(AVProbeData *p) 30 static int flv_probe(AVProbeData *p)
31 { 31 {
32 const uint8_t *d; 32 const uint8_t *d;
33 33
34 if (p->buf_size < 6)
35 return 0;
36 d = p->buf; 34 d = p->buf;
37 if (d[0] == 'F' && d[1] == 'L' && d[2] == 'V' && d[3] < 5 && d[5]==0) { 35 if (d[0] == 'F' && d[1] == 'L' && d[2] == 'V' && d[3] < 5 && d[5]==0) {
38 return AVPROBE_SCORE_MAX; 36 return AVPROBE_SCORE_MAX;
39 } 37 }
40 return 0; 38 return 0;