summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorThierry Foucu <tfoucu@gmail.com>2017-02-16 14:03:38 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2017-02-17 14:24:53 +0100
commit4bc7268f2b5fdef03b907279b4e6173cb0e5b835 (patch)
treeae409636f40a4efc726165c961251ca6c6807505 /libavformat
parent04e611474b9a82ddc8a53b08e80401379a40e410 (diff)
lavf/riff: Support decoding files with broken mediasubtype base guid.
Fixes ticket #6100.
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/riff.h2
-rw-r--r--libavformat/riffdec.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/riff.h b/libavformat/riff.h
index fe87e81933..d30d793cd1 100644
--- a/libavformat/riff.h
+++ b/libavformat/riff.h
@@ -109,6 +109,8 @@ extern const AVCodecGuid ff_codec_wav_guids[];
0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71
#define FF_AMBISONIC_BASE_GUID \
0x21, 0x07, 0xD3, 0x11, 0x86, 0x44, 0xC8, 0xC1, 0xCA, 0x00, 0x00, 0x00
+#define FF_BROKEN_BASE_GUID \
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0xAA
static av_always_inline int ff_guidcmp(const void *g1, const void *g2)
{
diff --git a/libavformat/riffdec.c b/libavformat/riffdec.c
index 42d9b4ac88..656a9ebcf8 100644
--- a/libavformat/riffdec.c
+++ b/libavformat/riffdec.c
@@ -72,6 +72,8 @@ static void parse_waveformatex(AVIOContext *pb, AVCodecParameters *par)
if (!memcmp(subformat + 4,
(const uint8_t[]){ FF_AMBISONIC_BASE_GUID }, 12) ||
!memcmp(subformat + 4,
+ (const uint8_t[]){ FF_BROKEN_BASE_GUID }, 12) ||
+ !memcmp(subformat + 4,
(const uint8_t[]){ FF_MEDIASUBTYPE_BASE_GUID }, 12)) {
par->codec_tag = AV_RL32(subformat);
par->codec_id = ff_wav_codec_get_id(par->codec_tag,