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

Unified Diff: media/filters/audio_renderer_base.cc

Issue 8785008: Simplify AudioRendererImpl by using AudioDevice. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update stale comment Created 9 years 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/audio_renderer_impl_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/audio_renderer_base.cc
diff --git a/media/filters/audio_renderer_base.cc b/media/filters/audio_renderer_base.cc
index 2528a70f5a6608d71a4a4e6eca51d66b6ef269ca..7960b07e7db3a5c0e02cb1cb68157c4b2a463752 100644
--- a/media/filters/audio_renderer_base.cc
+++ b/media/filters/audio_renderer_base.cc
@@ -147,8 +147,11 @@ void AudioRendererBase::ResumeAfterUnderflow(bool buffer_more_audio) {
void AudioRendererBase::ConsumeAudioSamples(scoped_refptr<Buffer> buffer_in) {
base::AutoLock auto_lock(lock_);
DCHECK(state_ == kPaused || state_ == kSeeking || state_ == kPlaying ||
- state_ == kUnderflow || state_ == kRebuffering);
- DCHECK_GT(pending_reads_, 0u);
+ state_ == kUnderflow || state_ == kRebuffering ||
+ state_ == kStopped);
+ if (!pending_reads_)
+ return;
+
--pending_reads_;
// TODO(scherkus): this happens due to a race, primarily because Stop() is a
« no previous file with comments | « content/renderer/media/audio_renderer_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698