avformat/wady: Check >0 samplerate and channels 1 || 2.
The WADY decoder only supports mono and stereo
This fixes a probetest failure
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 6f9e90ab0b
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@ -32,7 +32,8 @@ static int wady_probe(const AVProbeData *p)
|
|||||||
return 0;
|
return 0;
|
||||||
if (p->buf[4] != 0 || p->buf[5] == 0 ||
|
if (p->buf[4] != 0 || p->buf[5] == 0 ||
|
||||||
AV_RL16(p->buf+6) == 0 ||
|
AV_RL16(p->buf+6) == 0 ||
|
||||||
AV_RL32(p->buf+8) == 0)
|
AV_RL16(p->buf+6) > 2 ||
|
||||||
|
(int32_t)AV_RL32(p->buf+8) <= 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return AVPROBE_SCORE_MAX / 3 * 2;
|
return AVPROBE_SCORE_MAX / 3 * 2;
|
||||||
|
Reference in New Issue
Block a user