[SCM] libav/experimental: Improve SIFF probe by also checking the first tag is one of the expected.
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 16:51:22 UTC 2013
The following commit has been merged in the experimental branch:
commit 5abfae79ca6fbcbec559f4743e1d8c07a4d91518
Author: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
Date: Thu Sep 17 18:09:20 2009 +0000
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
diff --git a/libavformat/siff.c b/libavformat/siff.c
index 63fc0d6..1194f71 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)
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list