comparison flvdec.c @ 5193:360f4a07ce5e libavformat

Check offset in flv_probe()
author michael
date Tue, 15 Sep 2009 14:56:09 +0000
parents 01514407ab35
children 6f5a1064e48a
comparison
equal deleted inserted replaced
5192:ef6c4a95acb8 5193:360f4a07ce5e
37 static int flv_probe(AVProbeData *p) 37 static int flv_probe(AVProbeData *p)
38 { 38 {
39 const uint8_t *d; 39 const uint8_t *d;
40 40
41 d = p->buf; 41 d = p->buf;
42 if (d[0] == 'F' && d[1] == 'L' && d[2] == 'V' && d[3] < 5 && d[5]==0) { 42 if (d[0] == 'F' && d[1] == 'L' && d[2] == 'V' && d[3] < 5 && d[5]==0 && AV_RB32(d+5)>8) {
43 return AVPROBE_SCORE_MAX; 43 return AVPROBE_SCORE_MAX;
44 } 44 }
45 return 0; 45 return 0;
46 } 46 }
47 47