From 4f0801bd39e9213779b29f68753a9adcc0ad1107 Mon Sep 17 00:00:00 2001 From: "braveyao@webrtc.org" Date: Mon, 24 Feb 2014 09:19:36 +0000 Subject: [PATCH] AviRecorder is missing a critical section. BUG=2885 TEST=AUTOTEST R=perkj@webrtc.org Review URL: https://webrtc-codereview.appspot.com/9039004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5600 4adac7df-926f-26a2-2b94-8c16560cd09d --- webrtc/modules/utility/source/file_recorder_impl.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/webrtc/modules/utility/source/file_recorder_impl.cc b/webrtc/modules/utility/source/file_recorder_impl.cc index 032869c72b..7e13c369e9 100644 --- a/webrtc/modules/utility/source/file_recorder_impl.cc +++ b/webrtc/modules/utility/source/file_recorder_impl.cc @@ -715,6 +715,8 @@ int32_t AviRecorder::WriteEncodedAudioData( uint16_t millisecondsOfData, const TickTime* playoutTS) { + CriticalSectionScoped lock(_critSec); + if (!IsRecording()) { return -1;