From b4c5eaa0d6def89548ff30853096e9b13dde07f2 Mon Sep 17 00:00:00 2001 From: Niklas Enbom Date: Wed, 3 Jun 2015 09:34:25 -0700 Subject: [PATCH] Fix a time control bug, that the VCMReceiver::FrameForDecoding may over sleep. Remark: a unit test to verify VCMReiceiver::FrameForDecoding will be in a separate CL. BUG=4726 R=stefan@webrtc.org, wtc@chromium.org Review URL: https://webrtc-codereview.appspot.com/53619004 Cr-Commit-Position: refs/heads/master@{#9362} --- webrtc/modules/video_coding/main/source/receiver.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webrtc/modules/video_coding/main/source/receiver.cc b/webrtc/modules/video_coding/main/source/receiver.cc index 9efd4cd833..a2bfae6efc 100644 --- a/webrtc/modules/video_coding/main/source/receiver.cc +++ b/webrtc/modules/video_coding/main/source/receiver.cc @@ -142,7 +142,7 @@ VCMEncodedFrame* VCMReceiver::FrameForDecoding(uint16_t max_wait_time_ms, // We're not allowed to wait until the frame is supposed to be rendered, // waiting as long as we're allowed to avoid busy looping, and then return // NULL. Next call to this function might return the frame. - render_wait_event_->Wait(max_wait_time_ms); + render_wait_event_->Wait(new_max_wait_time); return NULL; } // Wait until it's time to render.