lavf/riff: Support decoding files with broken mediasubtype base guid.

Fixes ticket #6100.
pull/260/head^2
Thierry Foucu 8 years ago committed by Carl Eugen Hoyos
parent 04e611474b
commit 4bc7268f2b
  1. 2
      libavformat/riff.h
  2. 2
      libavformat/riffdec.c

@ -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)
{

@ -71,6 +71,8 @@ static void parse_waveformatex(AVIOContext *pb, AVCodecParameters *par)
ff_get_guid(pb, &subformat);
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);

Loading…
Cancel
Save