Commit 3a4d8281 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/genh: Fix tools/probetest failure

Reviewed-by: 's avatarPaul B Mahol <onemda@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 0be48dd9
...@@ -32,6 +32,8 @@ static int genh_probe(AVProbeData *p) ...@@ -32,6 +32,8 @@ static int genh_probe(AVProbeData *p)
{ {
if (AV_RL32(p->buf) != MKTAG('G','E','N','H')) if (AV_RL32(p->buf) != MKTAG('G','E','N','H'))
return 0; return 0;
if (AV_RL32(p->buf+4) <= 0 || AV_RL32(p->buf+4) > 0xFFFF) // channels
return 0;
return AVPROBE_SCORE_MAX / 3 * 2; return AVPROBE_SCORE_MAX / 3 * 2;
} }
......
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