[FFmpeg-cvslog] avformat/genh: Fix tools/probetest failure
Michael Niedermayer
git at videolan.org
Wed Nov 18 16:13:03 CET 2015
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Tue Nov 17 17:01:58 2015 +0100| [3a4d8281c64b6cb2a787e6e7142bd51deb356644] | committer: Michael Niedermayer
avformat/genh: Fix tools/probetest failure
Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3a4d8281c64b6cb2a787e6e7142bd51deb356644
---
libavformat/genh.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/genh.c b/libavformat/genh.c
index 260e320..d8723d5 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;
}
More information about the ffmpeg-cvslog
mailing list