Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Unified Diff: webrtc/video/video_receive_stream.cc

Issue 2146883002: Avoid race in VideoReceiveStream shutdown (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressed comments Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/modules/video_coding/jitter_buffer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/video_receive_stream.cc
diff --git a/webrtc/video/video_receive_stream.cc b/webrtc/video/video_receive_stream.cc
index ad9beb35e75384801cf03d264f935a7137a9b383..609a789fa2b530a2d65ecdb29c10fe98ee1b66eb 100644
--- a/webrtc/video/video_receive_stream.cc
+++ b/webrtc/video/video_receive_stream.cc
@@ -267,6 +267,9 @@ void VideoReceiveStream::Start() {
void VideoReceiveStream::Stop() {
rtp_stream_receiver_.StopReceive();
+ // TriggerDecoderShutdown will release any waiting decoder thread and make it
+ // stop immediately, instead of waiting for a timeout. Needs to be called
+ // before joining the decoder thread thread.
video_receiver_.TriggerDecoderShutdown();
decode_thread_.Stop();
call_stats_->DeregisterStatsObserver(video_stream_decoder_.get());
« no previous file with comments | « webrtc/modules/video_coding/jitter_buffer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698