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

Unified Diff: trunk/src/content/renderer/media/webrtc_audio_renderer.cc

Issue 195763008: Revert 255158 "Avoid hitting the thread check when WebRtcAudioRe..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 9 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 | « trunk/src/content/renderer/media/webrtc_audio_device_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/content/renderer/media/webrtc_audio_renderer.cc
===================================================================
--- trunk/src/content/renderer/media/webrtc_audio_renderer.cc (revision 256663)
+++ trunk/src/content/renderer/media/webrtc_audio_renderer.cc (working copy)
@@ -422,13 +422,6 @@
void WebRtcAudioRenderer::Stop() {
DVLOG(1) << "WebRtcAudioRenderer::Stop()";
DCHECK(thread_checker_.CalledOnValidThread());
- // Make sure to stop the sink while _not_ holding the lock since the Render()
- // callback may currently be executing and try to grab the lock while we're
- // stopping the thread on which it runs.
- // Stop the sink before calling RemoveAudioRenderer() to make sure that no
- // more callbacks will be made while the renderer is being removed.
- sink_->Stop();
-
{
base::AutoLock auto_lock(lock_);
if (state_ == UNINITIALIZED)
@@ -443,6 +436,11 @@
source_ = NULL;
state_ = UNINITIALIZED;
}
+
+ // Make sure to stop the sink while _not_ holding the lock since the Render()
+ // callback may currently be executing and try to grab the lock while we're
+ // stopping the thread on which it runs.
+ sink_->Stop();
}
void WebRtcAudioRenderer::SetVolume(float volume) {
« no previous file with comments | « trunk/src/content/renderer/media/webrtc_audio_device_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698