diff --git a/media/webrtc/trunk/webrtc/modules/video_render/incoming_video_stream.cc b/media/webrtc/trunk/webrtc/modules/video_render/incoming_video_stream.cc index ffeb9e8c1c41..8815142f5871 100644 --- a/media/webrtc/trunk/webrtc/modules/video_render/incoming_video_stream.cc +++ b/media/webrtc/trunk/webrtc/modules/video_render/incoming_video_stream.cc @@ -292,13 +292,12 @@ bool IncomingVideoStream::IncomingVideoStreamThreadFun(void* obj) { bool IncomingVideoStream::IncomingVideoStreamProcess() { if (kEventError != deliver_buffer_event_.Wait(KEventMaxWaitTimeMs)) { - thread_critsect_.Enter(); if (incoming_render_thread_ == NULL) { // Terminating - thread_critsect_.Leave(); return false; } + thread_critsect_.Enter(); I420VideoFrame* frame_to_render = NULL; // Get a new frame to render and the time for the frame after this one.