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

Unified Diff: webrtc/video/video_send_stream.cc

Issue 1696693002: Fix race on VCM protection callback. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 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/video/video_send_stream.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/video_send_stream.cc
diff --git a/webrtc/video/video_send_stream.cc b/webrtc/video/video_send_stream.cc
index 5c3f74fd7e815a7fdf13b194a82130b8698dc2f2..9ce1a8427307dff3b89cb08e2b6b41ab77b90b76 100644
--- a/webrtc/video/video_send_stream.cc
+++ b/webrtc/video/video_send_stream.cc
@@ -145,15 +145,6 @@ VideoSendStream::VideoSendStream(
this,
config.post_encode_callback,
&stats_proxy_),
- vie_encoder_(num_cpu_cores,
- module_process_thread_,
- &stats_proxy_,
- config.pre_encode_callback,
- &overuse_detector_,
- congestion_controller_->pacer(),
- &payload_router_,
- bitrate_allocator),
- vcm_(vie_encoder_.vcm()),
vie_channel_(config.send_transport,
module_process_thread_,
&payload_router_,
@@ -169,6 +160,15 @@ VideoSendStream::VideoSendStream(
config_.rtp.ssrcs.size(),
true),
vie_receiver_(vie_channel_.vie_receiver()),
+ vie_encoder_(num_cpu_cores,
+ module_process_thread_,
+ &stats_proxy_,
+ config.pre_encode_callback,
+ &overuse_detector_,
+ congestion_controller_->pacer(),
+ &payload_router_,
+ bitrate_allocator),
+ vcm_(vie_encoder_.vcm()),
input_(&vie_encoder_,
config_.local_renderer,
&stats_proxy_,
@@ -265,10 +265,6 @@ VideoSendStream::~VideoSendStream() {
Stop();
module_process_thread_->DeRegisterModule(&overuse_detector_);
- // Remove vcm_protection_callback (part of vie_channel_) before destroying
- // ViEChannel. vcm_ is owned by ViEEncoder and the registered callback does
- // not outlive it.
- vcm_->RegisterProtectionCallback(nullptr);
vie_channel_.RegisterSendFrameCountObserver(nullptr);
vie_channel_.RegisterSendBitrateObserver(nullptr);
vie_channel_.RegisterRtcpPacketTypeCounterObserver(nullptr);
« no previous file with comments | « webrtc/video/video_send_stream.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698