comparison dxa.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 7ccf23e42481
children 7eb456c4ed8a
comparison
equal deleted inserted replaced
2000:ce51095f383b 2001:1a3c9056982a
34 }DXAContext; 34 }DXAContext;
35 35
36 static int dxa_probe(AVProbeData *p) 36 static int dxa_probe(AVProbeData *p)
37 { 37 {
38 /* check file header */ 38 /* check file header */
39 if (p->buf_size <= 4)
40 return 0;
41 if (p->buf[0] == 'D' && p->buf[1] == 'E' && 39 if (p->buf[0] == 'D' && p->buf[1] == 'E' &&
42 p->buf[2] == 'X' && p->buf[3] == 'A') 40 p->buf[2] == 'X' && p->buf[3] == 'A')
43 return AVPROBE_SCORE_MAX; 41 return AVPROBE_SCORE_MAX;
44 else 42 else
45 return 0; 43 return 0;