From f7813a5324be39d13ab536c245d15dfc602a7849 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Sun, 29 Dec 2013 12:19:38 +0000 Subject: basic type mechanism working --- ffmpeg/libavformat/lvfdec.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'ffmpeg/libavformat/lvfdec.c') diff --git a/ffmpeg/libavformat/lvfdec.c b/ffmpeg/libavformat/lvfdec.c index f8dda58..1ff67c8 100644 --- a/ffmpeg/libavformat/lvfdec.c +++ b/ffmpeg/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_MAX / 2; - 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 AVPROBE_SCORE_MAX / 8; + + return AVPROBE_SCORE_EXTENSION; } static int lvf_read_header(AVFormatContext *s) -- cgit v1.2.3