From 6b6aa59ffc97ac76b4429db38eedac8474f5fda7 Mon Sep 17 00:00:00 2001 From: Jeroen Vreeken Date: Thu, 18 Jul 2019 11:00:46 +0200 Subject: Alow AAC audio codec data in matroska/webm streams. Allow CRC32 elements in matroska cluster elements. --- dom/media/webm/WebMDecoder.cpp | 4 ++++ dom/media/webm/WebMDemuxer.cpp | 2 ++ 2 files changed, 6 insertions(+) (limited to 'dom/media/webm') diff --git a/dom/media/webm/WebMDecoder.cpp b/dom/media/webm/WebMDecoder.cpp index 5cb943742..cbe9ffdb7 100644 --- a/dom/media/webm/WebMDecoder.cpp +++ b/dom/media/webm/WebMDecoder.cpp @@ -82,6 +82,10 @@ WebMDecoder::CanHandleMediaType(const nsACString& aMIMETypeExcludingCodecs, continue; } + if (IsAACCodecString(codec)) { + continue; + } + // Some unsupported codec. return false; } diff --git a/dom/media/webm/WebMDemuxer.cpp b/dom/media/webm/WebMDemuxer.cpp index 2b6d46186..84b4b506e 100644 --- a/dom/media/webm/WebMDemuxer.cpp +++ b/dom/media/webm/WebMDemuxer.cpp @@ -422,6 +422,8 @@ WebMDemuxer::ReadMetadata() mInfo.mAudio.mMimeType = "audio/opus"; OpusDataDecoder::AppendCodecDelay(mInfo.mAudio.mCodecSpecificConfig, media::TimeUnit::FromNanoseconds(params.codec_delay).ToMicroseconds()); + } else if (mAudioCodec == NESTEGG_CODEC_AAC) { + mInfo.mAudio.mMimeType = "audio/mp4a-latm"; } mSeekPreroll = params.seek_preroll; mInfo.mAudio.mRate = params.rate; -- cgit v1.2.3