Commit 650fd9c0 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/avr: check channels and bps in probe

Fixes probetest failure
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 676bc505
...@@ -26,9 +26,15 @@ ...@@ -26,9 +26,15 @@
static int avr_probe(AVProbeData *p) static int avr_probe(AVProbeData *p)
{ {
if (AV_RL32(p->buf) == MKTAG('2', 'B', 'I', 'T')) if (AV_RL32(p->buf) != MKTAG('2', 'B', 'I', 'T'))
return AVPROBE_SCORE_EXTENSION;
return 0; return 0;
if (!AV_RB16(p->buf+12) || AV_RB16(p->buf+12) > 256) // channels
return AVPROBE_SCORE_EXTENSION/2;
if (AV_RB16(p->buf+14) > 256) // bps
return AVPROBE_SCORE_EXTENSION/2;
return AVPROBE_SCORE_EXTENSION;
} }
static int avr_read_header(AVFormatContext *s) static int avr_read_header(AVFormatContext *s)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment