Bug 1350148: [AAC] Don't set channel count on output decoder. r?jya draft
authorJean-Yves Avenard <jyavenard@mozilla.com>
Fri, 24 Mar 2017 09:48:07 +0100
changeset 511516 ffd50d31f388c9eb657f7e273db74c7dbecf5de8
parent 504562 72bc265f157f3937f25d18be68b60fb982df695a
child 511517 dcb3012f95039c4547acc6f2bbc4f965c6ed9842
push id50879
push userbmo:jyavenard@mozilla.com
push dateFri, 24 Mar 2017 17:37:17 +0000
reviewersjya
bugs1350148, 1347101
milestone55.0a1
Bug 1350148: [AAC] Don't set channel count on output decoder. r?jya Windows AAC decoder decode a mono AAC stream into a stereo PCM. Bug 1347101 set the output to be mono, which caused a failure to find the appropriate IMFMediaType. This partially revert bug 1347101 audio changes. MozReview-Commit-ID: 2M4X4rKKvXl
dom/media/platforms/wmf/WMFAudioMFTManager.cpp
--- a/dom/media/platforms/wmf/WMFAudioMFTManager.cpp
+++ b/dom/media/platforms/wmf/WMFAudioMFTManager.cpp
@@ -175,22 +175,16 @@ WMFAudioMFTManager::Init()
   NS_ENSURE_TRUE(SUCCEEDED(hr), false);
 
   hr = outputType->SetGUID(MF_MT_SUBTYPE, MFAudioFormat_Float);
   NS_ENSURE_TRUE(SUCCEEDED(hr), false);
 
   hr = outputType->SetUINT32(MF_MT_AUDIO_BITS_PER_SAMPLE, 32);
   NS_ENSURE_TRUE(SUCCEEDED(hr), false);
 
-  hr = outputType->SetUINT32(MF_MT_AUDIO_NUM_CHANNELS, mAudioChannels);
-  NS_ENSURE_TRUE(SUCCEEDED(hr), false);
-
-  hr = outputType->SetUINT32(MF_MT_ALL_SAMPLES_INDEPENDENT, 1);
-  NS_ENSURE_TRUE(SUCCEEDED(hr), false);
-
   hr = decoder->SetMediaTypes(inputType, outputType);
   NS_ENSURE_TRUE(SUCCEEDED(hr), false);
 
   mDecoder = decoder;
 
   return true;
 }