From 92f7ff8221fd4f2ac233cc5b0ee14b34b8a80b42 Mon Sep 17 00:00:00 2001 From: John Bradley Date: Sat, 6 Aug 2016 23:29:44 +0200 Subject: [PATCH] win-mf: Remove extensions/profile from AAC header With this change "Movies & TV" (version 3.6.2251.0) and Firefox 47.0 play audio encoded with mf_aac --- plugins/win-mf/mf-aac-encoder.cpp | 9 +-------- plugins/win-mf/mf-aac-encoder.hpp | 2 +- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/plugins/win-mf/mf-aac-encoder.cpp b/plugins/win-mf/mf-aac-encoder.cpp index 5ac949e20..31363347c 100644 --- a/plugins/win-mf/mf-aac-encoder.cpp +++ b/plugins/win-mf/mf-aac-encoder.cpp @@ -136,14 +136,7 @@ void MFAAC::Encoder::InitializeExtraData() *extraData16 |= channels << 3; *extraData16 = SWAPU16(*extraData16); - // Extensions - extraData16++; - *extraData16 = 0x2b7 << 5; - // Profile - *extraData16 |= profile; - *extraData16 = SWAPU16(*extraData16); - - extraData[4] = 0; + extraData[2] = 0; #undef SWAPU16 } diff --git a/plugins/win-mf/mf-aac-encoder.hpp b/plugins/win-mf/mf-aac-encoder.hpp index d9aa2d25e..5ca83371e 100644 --- a/plugins/win-mf/mf-aac-encoder.hpp +++ b/plugins/win-mf/mf-aac-encoder.hpp @@ -74,7 +74,7 @@ private: ComPtr transform; ComPtr outputSample; std::vector packetBuffer; - UINT8 extraData[5]; + UINT8 extraData[3]; }; static const UINT32 FrameSize = 1024;