Bug 911450: followup, fix CriticalSectionScoped scope NPOTB r=jesup

This commit is contained in:
Landry Breuil 2015-11-17 19:05:52 +01:00
parent 4e8cbd4024
commit 679a3084dd

View File

@ -747,14 +747,16 @@ int32_t AudioDeviceSndio::StartRecording()
int32_t AudioDeviceSndio::StopRecording()
{
CriticalSectionScoped lock(&_critSect);
if (_recHandle == NULL)
{
return 0;
}
CriticalSectionScoped lock(&_critSect);
_recording = false;
if (_recHandle == NULL)
{
return 0;
}
_recording = false;
}
if (_ptrThreadRec && !_ptrThreadRec->Stop())
{
@ -841,12 +843,15 @@ int32_t AudioDeviceSndio::StartPlayout()
int32_t AudioDeviceSndio::StopPlayout()
{
CriticalSectionScoped lock(&_critSect);
if (_playHandle == NULL)
{
return 0;
CriticalSectionScoped lock(&_critSect);
if (_playHandle == NULL)
{
return 0;
}
_playing = false;
}
_playing = false;
if (_ptrThreadPlay && !_ptrThreadPlay->Stop())
{