Bug 1447982 - Cover channel count changes also when mic source is stopped (muted). r?padenot draft
authorAndreas Pehrson <pehrsons@mozilla.com>
Mon, 26 Mar 2018 11:02:26 +0200
changeset 781065 6dde31441b6b0c677f1f21b52a3a4e2eb1ae0244
parent 781064 fa13296ec0e85b1f08496b1174f8fff6762832dc
child 781066 1ec795379f625315755b0f7fc658e660bce6c929
push id106197
push userbmo:apehrson@mozilla.com
push dateThu, 12 Apr 2018 13:32:52 +0000
reviewerspadenot
bugs1447982
milestone61.0a1
Bug 1447982 - Cover channel count changes also when mic source is stopped (muted). r?padenot MozReview-Commit-ID: HtDS5SXL08
dom/media/webrtc/MediaEngineWebRTCAudio.cpp
--- a/dom/media/webrtc/MediaEngineWebRTCAudio.cpp
+++ b/dom/media/webrtc/MediaEngineWebRTCAudio.cpp
@@ -461,16 +461,17 @@ MediaEngineWebRTCMicrophoneSource::Updat
         uint32_t channelCount = 0;
         mAudioInput->GetChannelCount(channelCount);
         MOZ_ASSERT(channelCount > 0);
         prefs.mChannels = channelCount;
       }
       break;
 
     case kStarted:
+    case kStopped:
       if (prefs == mLastPrefs) {
         return NS_OK;
       }
 
       if (prefs.mChannels != mLastPrefs.mChannels) {
         // If the channel count changed, tell the MSG to open a new driver with
         // the correct channel count.
         MOZ_ASSERT(!mAllocations.IsEmpty());