mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-28 12:32:17 +02:00
lavf/riff: Support decoding Ambisonic wav files.
Reported and tested by Andy Furniss, adf d lists at gmail
This commit is contained in:
parent
2fc552b629
commit
f17ca46009
@ -107,6 +107,8 @@ extern const AVCodecGuid ff_codec_wav_guids[];
|
|||||||
|
|
||||||
#define FF_MEDIASUBTYPE_BASE_GUID \
|
#define FF_MEDIASUBTYPE_BASE_GUID \
|
||||||
0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71
|
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
|
||||||
|
|
||||||
static av_always_inline int ff_guidcmp(const void *g1, const void *g2)
|
static av_always_inline int ff_guidcmp(const void *g1, const void *g2)
|
||||||
{
|
{
|
||||||
|
@ -69,6 +69,8 @@ static void parse_waveformatex(AVIOContext *pb, AVCodecContext *c)
|
|||||||
|
|
||||||
ff_get_guid(pb, &subformat);
|
ff_get_guid(pb, &subformat);
|
||||||
if (!memcmp(subformat + 4,
|
if (!memcmp(subformat + 4,
|
||||||
|
(const uint8_t[]){ FF_AMBISONIC_BASE_GUID }, 12) ||
|
||||||
|
!memcmp(subformat + 4,
|
||||||
(const uint8_t[]){ FF_MEDIASUBTYPE_BASE_GUID }, 12)) {
|
(const uint8_t[]){ FF_MEDIASUBTYPE_BASE_GUID }, 12)) {
|
||||||
c->codec_tag = AV_RL32(subformat);
|
c->codec_tag = AV_RL32(subformat);
|
||||||
c->codec_id = ff_wav_codec_get_id(c->codec_tag,
|
c->codec_id = ff_wav_codec_get_id(c->codec_tag,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user