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

Unified Diff: content/renderer/media/webrtc_audio_device_impl.cc

Issue 178153007: Avoid hitting the thread check when WebRtcAudioRenderer is going away. (Closed) Base URL: http://git.chromium.org/chromium/src.git@libjingle_get_stats
Patch Set: Created 6 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 | « content/renderer/media/webrtc_audio_device_impl.h ('k') | content/renderer/media/webrtc_audio_renderer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/webrtc_audio_device_impl.cc
diff --git a/content/renderer/media/webrtc_audio_device_impl.cc b/content/renderer/media/webrtc_audio_device_impl.cc
index ef816fcc60d359c2f150be6fb5ce8cead0108686..7e27af1a08cfac518300914d164e73cac44da714 100644
--- a/content/renderer/media/webrtc_audio_device_impl.cc
+++ b/content/renderer/media/webrtc_audio_device_impl.cc
@@ -175,6 +175,12 @@ void WebRtcAudioDeviceImpl::RemoveAudioRenderer(WebRtcAudioRenderer* renderer) {
DCHECK(thread_checker_.CalledOnValidThread());
DCHECK_EQ(renderer, renderer_);
base::AutoLock auto_lock(lock_);
+ // Notify the playout sink of the change.
+ for (PlayoutDataSinkList::const_iterator it = playout_sinks_.begin();
+ it != playout_sinks_.end(); ++it) {
+ (*it)->OnPlayoutDataSourceChanged();
+ }
+
renderer_ = NULL;
playing_ = false;
}
« no previous file with comments | « content/renderer/media/webrtc_audio_device_impl.h ('k') | content/renderer/media/webrtc_audio_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698