avformat/cafdec: improve probing
This commit is contained in:
parent
ea06317190
commit
365529178d
1 changed files with 9 additions and 3 deletions
|
@ -52,9 +52,15 @@ typedef struct CafContext {
|
||||||
|
|
||||||
static int probe(const AVProbeData *p)
|
static int probe(const AVProbeData *p)
|
||||||
{
|
{
|
||||||
if (AV_RB32(p->buf) == MKBETAG('c','a','f','f') && AV_RB16(&p->buf[4]) == 1)
|
if (AV_RB32(p->buf) != MKBETAG('c','a','f','f'))
|
||||||
return AVPROBE_SCORE_MAX;
|
|
||||||
return 0;
|
return 0;
|
||||||
|
if (AV_RB16(&p->buf[4]) != 1)
|
||||||
|
return 0;
|
||||||
|
if (AV_RB32(p->buf + 8) != MKBETAG('d','e','s','c'))
|
||||||
|
return 0;
|
||||||
|
if (AV_RB64(p->buf + 12) != 32)
|
||||||
|
return 0;
|
||||||
|
return AVPROBE_SCORE_MAX;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Read audio description chunk */
|
/** Read audio description chunk */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue