Skip to content

Commit

Permalink
Fixed race condition by adding critical section
Browse files Browse the repository at this point in the history
  • Loading branch information
sskodje committed Apr 2, 2023
1 parent 305eac6 commit a9f7c34
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ScreenRecorderLibNative/AudioManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ void AudioManager::OnOptionsChanged() {
break;
}
case WAIT_OBJECT_0 + 1: {
EnterCriticalSection(&m_CriticalSection);
LeaveCriticalSectionOnExit leaveOnExit(&m_CriticalSection);
ConfigureAudioCapture();
break;
}
Expand Down

0 comments on commit a9f7c34

Please sign in to comment.