mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
tta: make probing more robust
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
35e683e457
commit
ced0307ea9
@ -33,9 +33,11 @@ typedef struct {
|
||||
|
||||
static int tta_probe(AVProbeData *p)
|
||||
{
|
||||
const uint8_t *d = p->buf;
|
||||
|
||||
if (d[0] == 'T' && d[1] == 'T' && d[2] == 'A' && d[3] == '1')
|
||||
if (AV_RL32(&p->buf[0]) == MKTAG('T', 'T', 'A', '1') &&
|
||||
(AV_RL16(&p->buf[4]) == 1 || AV_RL16(&p->buf[4]) == 2) &&
|
||||
AV_RL16(&p->buf[6]) > 0 &&
|
||||
AV_RL16(&p->buf[8]) > 0 &&
|
||||
AV_RL32(&p->buf[10]) > 0)
|
||||
return AVPROBE_SCORE_EXTENSION + 30;
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user