Mercurial > libavformat.hg
diff siff.c @ 5217:0d44bd284a96 libavformat
Improve SIFF probe by also checking the first tag is one of the expected.
| author | reimar |
|---|---|
| date | Thu, 17 Sep 2009 18:09:20 +0000 |
| parents | 77e0c7511d41 |
| children | 536e5527c1e0 |
line wrap: on
line diff
--- a/siff.c Thu Sep 17 18:08:07 2009 +0000 +++ b/siff.c Thu Sep 17 18:09:20 2009 +0000 @@ -60,11 +60,12 @@ 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)
