diff options
| author | Tim Redfern <tim@eclectronics.org> | 2013-12-29 12:19:38 +0000 |
|---|---|---|
| committer | Tim Redfern <tim@eclectronics.org> | 2013-12-29 12:19:38 +0000 |
| commit | f7813a5324be39d13ab536c245d15dfc602a7849 (patch) | |
| tree | fad99148b88823d34a5df2f0a25881a002eb291b /ffmpeg/libavformat/lvfdec.c | |
| parent | b7a5a477b8ff4d4e3028b9dfb9a9df0a41463f92 (diff) | |
basic type mechanism working
Diffstat (limited to 'ffmpeg/libavformat/lvfdec.c')
| -rw-r--r-- | ffmpeg/libavformat/lvfdec.c | 10 |
1 files changed, 7 insertions, 3 deletions
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) |
