diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-09-17 18:09:20 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-09-17 18:09:20 +0000 |
commit | 5abfae79ca6fbcbec559f4743e1d8c07a4d91518 (patch) | |
tree | ea0aeed6fd292295135a62f32debc7666b4fef22 /libavformat/siff.c | |
parent | 3214db98ea1c71f6e6bb67adf077c695ac572692 (diff) | |
download | ffmpeg-5abfae79ca6fbcbec559f4743e1d8c07a4d91518.tar.gz |
Improve SIFF probe by also checking the first tag is one of the expected.
Originally committed as revision 19898 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/siff.c')
-rw-r--r-- | libavformat/siff.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavformat/siff.c b/libavformat/siff.c index 63fc0d6fac..1194f71bf6 100644 --- a/libavformat/siff.c +++ b/libavformat/siff.c @@ -60,11 +60,12 @@ typedef struct SIFFContext{ static int siff_probe(AVProbeData *p) { + uint32_t tag = AV_RL32(p->buf + 8); /* check file header */ - if (AV_RL32(p->buf) == TAG_SIFF) - return AVPROBE_SCORE_MAX; - else + if (AV_RL32(p->buf) != TAG_SIFF || + (tag != TAG_VBV1 && tag != TAG_SOUN)) return 0; + return AVPROBE_SCORE_MAX; } static int create_audio_stream(AVFormatContext *s, SIFFContext *c) |