[FFmpeg-cvslog] avformat/lvfdec: check stream count during probing
Michael Niedermayer
git at videolan.org
Fri Nov 8 17:12:49 CET 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Nov 8 17:03:42 2013 +0100| [f8a9cf77040e1b2ed83206269ead11aa30afb98d] | committer: Michael Niedermayer
avformat/lvfdec: check stream count during probing
Fixes probetest failure
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f8a9cf77040e1b2ed83206269ead11aa30afb98d
---
libavformat/lvfdec.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/libavformat/lvfdec.c b/libavformat/lvfdec.c
index a809c67..d4bad12 100644
--- a/libavformat/lvfdec.c
+++ b/libavformat/lvfdec.c
@@ -25,9 +25,13 @@
static int lvf_probe(AVProbeData *p)
{
- if (AV_RL32(p->buf) == MKTAG('L', 'V', 'F', 'F'))
- return AVPROBE_SCORE_EXTENSION;
- return 0;
+ if (AV_RL32(p->buf) != MKTAG('L', 'V', 'F', 'F'))
+ return 0;
+
+ if (!AV_RL32(p->buf + 16) || AV_RL32(p->buf + 16) > 256)
+ return 0;
+
+ return AVPROBE_SCORE_EXTENSION;
}
static int lvf_read_header(AVFormatContext *s)
More information about the ffmpeg-cvslog
mailing list