diff options
| -rw-r--r-- | indra/llwebrtc/llwebrtc.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/indra/llwebrtc/llwebrtc.cpp b/indra/llwebrtc/llwebrtc.cpp index b6b205e858..3b3e7ea3ba 100644 --- a/indra/llwebrtc/llwebrtc.cpp +++ b/indra/llwebrtc/llwebrtc.cpp @@ -768,8 +768,14 @@ void LLWebRTCImpl::workerDeployDevices() // Stop first so the start helpers (which no-op when already running) will // re-select the now-current device. - mDeviceModule->StopPlayout(); - mDeviceModule->ForceStopRecording(); + if (mDeviceModule->Playing()) + { + mDeviceModule->StopPlayout(); + } + if (mDeviceModule->Recording()) + { + mDeviceModule->ForceStopRecording(); + } workerStartRecording(); workerStartPlayout(); @@ -1061,7 +1067,10 @@ void LLWebRTCImpl::freePeerConnection(LLWebRTCPeerConnectionInterface* peer_conn { if (mDeviceModule) { - mDeviceModule->StopPlayout(); + if (mDeviceModule->Playing()) + { + mDeviceModule->StopPlayout(); + } if (!mVoiceEnabled) { mDeviceModule->ForceStopRecording(); |
