CoreAudio Win: release resources safely under certain rare circumstance in GTalkplugin

BUG=
TEST=voe_auto_test
R=henrika@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/1479004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4033 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
braveyao@webrtc.org 2013-05-15 10:14:56 +00:00
parent e2a800644c
commit c93b1d038d

View File

@ -3541,11 +3541,9 @@ DWORD AudioDeviceWindowsCore::DoRenderThread()
case WAIT_OBJECT_0 + 1: // _hRenderSamplesReadyEvent
break;
case WAIT_TIMEOUT: // timeout notification
_ptrClientOut->Stop();
WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id, "render event timed out after 0.5 seconds");
goto Exit;
default: // unexpected error
_ptrClientOut->Stop();
WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id, "unknown wait termination on render side");
goto Exit;
}
@ -3999,11 +3997,9 @@ DWORD AudioDeviceWindowsCore::DoCaptureThread()
case WAIT_OBJECT_0 + 1: // _hCaptureSamplesReadyEvent
break;
case WAIT_TIMEOUT: // timeout notification
_ptrClientIn->Stop();
WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id, "capture event timed out after 0.5 seconds");
goto Exit;
default: // unexpected error
_ptrClientIn->Stop();
WEBRTC_TRACE(kTraceWarning, kTraceAudioDevice, _id, "unknown wait termination on capture side");
goto Exit;
}