Bug 1447982 - Remove unnecessary conditional. r?padenot draft
authorAndreas Pehrson <pehrsons@mozilla.com>
Mon, 26 Mar 2018 10:57:06 +0200
changeset 781063 86652814519f1a0ae473119ec1f38fe2b69e2dc6
parent 781062 a647d1638bd3d7f8b6ce1d788255d0fbcdfccdcd
child 781064 fa13296ec0e85b1f08496b1174f8fff6762832dc
push id106197
push userbmo:apehrson@mozilla.com
push dateThu, 12 Apr 2018 13:32:52 +0000
reviewerspadenot
bugs1447982
milestone61.0a1
Bug 1447982 - Remove unnecessary conditional. r?padenot MozReview-Commit-ID: LKy9TGsGEfj
dom/media/webrtc/MediaEngineWebRTCAudio.cpp
--- a/dom/media/webrtc/MediaEngineWebRTCAudio.cpp
+++ b/dom/media/webrtc/MediaEngineWebRTCAudio.cpp
@@ -483,18 +483,17 @@ MediaEngineWebRTCMicrophoneSource::Updat
         }
         MOZ_ASSERT(stream);
 
         mAudioInput->SetUserChannelCount(prefs.mChannels);
         // Get validated number of channel
         uint32_t channelCount = 0;
         mAudioInput->GetChannelCount(channelCount);
         MOZ_ASSERT(channelCount > 0 && mLastPrefs.mChannels > 0);
-        if (mLastPrefs.mChannels != prefs.mChannels &&
-            !stream->OpenNewAudioCallbackDriver(mListener)) {
+        if (!stream->OpenNewAudioCallbackDriver(mListener)) {
           MOZ_LOG(GetMediaManagerLog(), LogLevel::Error, ("Could not open a new AudioCallbackDriver for input"));
           return NS_ERROR_FAILURE;
         }
       }
 
       if (MOZ_LOG_TEST(GetMediaManagerLog(), LogLevel::Debug)) {
         if (mAllocations.IsEmpty()) {
           LOG(("Audio device %d reallocated", mCapIndex));