You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-11-23 21:54:53 +02:00
avformat/riffdec: add support for HEAACWAVEFORMAT
This is an extension to WAVEFORMATEX used for some AAC streams, defined in the Windows SDK. Fixes issue #20887. Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
@@ -596,6 +596,7 @@ const AVCodecTag ff_codec_wav_tags[] = {
|
||||
/* ADTS AAC */
|
||||
{ AV_CODEC_ID_AAC, 0x1600 },
|
||||
{ AV_CODEC_ID_AAC_LATM, 0x1602 },
|
||||
{ AV_CODEC_ID_AAC, 0x1610 },
|
||||
{ AV_CODEC_ID_AC3, 0x2000 },
|
||||
/* There is no Microsoft Format Tag for E-AC3, the GUID has to be used */
|
||||
{ AV_CODEC_ID_EAC3, 0x2000 },
|
||||
|
||||
@@ -149,6 +149,20 @@ int ff_get_wav_header(AVFormatContext *s, AVIOContext *pb,
|
||||
parse_waveformatex(s, pb, par);
|
||||
cbSize -= 22;
|
||||
size -= 22;
|
||||
} else if (cbSize >= 12 && id == 0x1610) { /* HEAACWAVEFORMAT */
|
||||
int wPayloadType = avio_rl16(pb);
|
||||
if (wPayloadType == 3)
|
||||
par->codec_id = AV_CODEC_ID_AAC_LATM;
|
||||
avio_skip(pb, 2); // wAudioProfileLevelIndication
|
||||
int wStructType = avio_rl16(pb);
|
||||
if (wStructType) {
|
||||
avpriv_report_missing_feature(s, "HEAACWAVEINFO wStructType \"%d\"", wStructType);
|
||||
return AVERROR_PATCHWELCOME;
|
||||
}
|
||||
avio_skip(pb, 2); // wReserved1
|
||||
avio_skip(pb, 4); // dwReserved2
|
||||
cbSize -= 12;
|
||||
size -= 12;
|
||||
}
|
||||
if (cbSize > 0) {
|
||||
ret = ff_get_extradata(s, par, pb, cbSize);
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "version_major.h"
|
||||
|
||||
#define LIBAVFORMAT_VERSION_MINOR 6
|
||||
#define LIBAVFORMAT_VERSION_MICRO 101
|
||||
#define LIBAVFORMAT_VERSION_MICRO 102
|
||||
|
||||
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
|
||||
LIBAVFORMAT_VERSION_MINOR, \
|
||||
|
||||
Reference in New Issue
Block a user