[FFmpeg-devel] [PATCH] avformat/genh: Fix tools/probetest failure
Michael Niedermayer
michaelni at gmx.at
Tue Nov 17 17:01:58 CET 2015
From: Michael Niedermayer <michael at niedermayer.cc>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
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;
}
--
1.7.9.5
More information about the ffmpeg-devel
mailing list