aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/lvfdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-11-08 17:03:42 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-11-08 17:03:42 +0100
commitf8a9cf77040e1b2ed83206269ead11aa30afb98d (patch)
tree6e8e816623990af1aafd7c0c2ab1757b23231e93 /libavformat/lvfdec.c
parent4c439f6e3999ae534991ecde943e45b00c80b8d2 (diff)
downloadffmpeg-f8a9cf77040e1b2ed83206269ead11aa30afb98d.tar.gz
avformat/lvfdec: check stream count during probing
Fixes probetest failure Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/lvfdec.c')
-rw-r--r--libavformat/lvfdec.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/libavformat/lvfdec.c b/libavformat/lvfdec.c
index a809c6767b..d4bad12cc3 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)