Adding critsect to VCM::StartDebugRecording.

BUG=793
TEST=vie_auto_test --automated --gtest_filter=ViEStandardIntegrationTest.RunsFileTestWithoutErrors --gtest_repeat=-1 --gtest_break_on_failure for an hour

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@2698 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
mflodman@webrtc.org 2012-09-03 13:22:29 +00:00
parent 03b2b85b19
commit c81a801ed7

View File

@ -1367,6 +1367,7 @@ int VideoCodingModuleImpl::SetReceiverRobustnessMode(
}
int VideoCodingModuleImpl::StartDebugRecording(const char* file_name_utf8) {
CriticalSectionScoped cs(_sendCritSect);
_encoderInputFile = fopen(file_name_utf8, "wb");
if (_encoderInputFile == NULL)
return VCM_GENERAL_ERROR;
@ -1374,6 +1375,7 @@ int VideoCodingModuleImpl::StartDebugRecording(const char* file_name_utf8) {
}
int VideoCodingModuleImpl::StopDebugRecording(){
CriticalSectionScoped cs(_sendCritSect);
if (_encoderInputFile != NULL) {
fclose(_encoderInputFile);
_encoderInputFile = NULL;