diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-11-17 17:01:58 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-11-18 14:45:51 +0100 |
commit | 3a4d8281c64b6cb2a787e6e7142bd51deb356644 (patch) | |
tree | 94d59903381146101b51faf9b8cd4db4673eccfd /libavformat/genh.c | |
parent | 0be48dd9bb6e89c1632fdc95185b24d0bec32843 (diff) | |
download | ffmpeg-3a4d8281c64b6cb2a787e6e7142bd51deb356644.tar.gz |
avformat/genh: Fix tools/probetest failure
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/genh.c')
-rw-r--r-- | libavformat/genh.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/genh.c b/libavformat/genh.c index 260e32064f..d8723d51a3 100644 --- a/libavformat/genh.c +++ b/libavformat/genh.c @@ -32,6 +32,8 @@ static int genh_probe(AVProbeData *p) { if (AV_RL32(p->buf) != MKTAG('G','E','N','H')) return 0; + if (AV_RL32(p->buf+4) <= 0 || AV_RL32(p->buf+4) > 0xFFFF) // channels + return 0; return AVPROBE_SCORE_MAX / 3 * 2; } |