From 021c42bfa823e979d7ab23019e6a85b84b791585 Mon Sep 17 00:00:00 2001 From: "pbos@webrtc.org" Date: Mon, 9 Sep 2013 17:18:31 +0000 Subject: [PATCH] Lock use of _packetRequestCallback in VCM. BUG= R=stefan@webrtc.org Review URL: https://webrtc-codereview.appspot.com/2190006 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4708 4adac7df-926f-26a2-2b94-8c16560cd09d --- .../modules/video_coding/main/source/video_coding_impl.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/webrtc/modules/video_coding/main/source/video_coding_impl.cc b/webrtc/modules/video_coding/main/source/video_coding_impl.cc index 39d6eeb88..81398d83d 100644 --- a/webrtc/modules/video_coding/main/source/video_coding_impl.cc +++ b/webrtc/modules/video_coding/main/source/video_coding_impl.cc @@ -173,12 +173,9 @@ VideoCodingModuleImpl::Process() { // disabled when NACK is off. if (_retransmissionTimer.TimeUntilProcess() == 0) { _retransmissionTimer.Processed(); + CriticalSectionScoped cs(_receiveCritSect); if (_packetRequestCallback != NULL) { - uint16_t length; - { - CriticalSectionScoped cs(_receiveCritSect); - length = max_nack_list_size_; - } + uint16_t length = max_nack_list_size_; std::vector nackList(length); const int32_t ret = NackList(&nackList[0], length); if (ret != VCM_OK && returnValue == VCM_OK) {