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

Unified Diff: media/filters/audio_renderer_base.cc

Issue 8477037: Simplify AudioRendererImpl by using AudioDevice. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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
Index: media/filters/audio_renderer_base.cc
===================================================================
--- media/filters/audio_renderer_base.cc (revision 110348)
+++ media/filters/audio_renderer_base.cc (working copy)
@@ -147,8 +147,11 @@
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_)
acolwell GONE FROM CHROMIUM 2011/11/17 19:16:12 nit: Consider just moving the DCHECK_GT() and --pe
vrk (LEFT CHROMIUM) 2011/12/02 22:54:46 Since this is a nit and I'm not that familiar with
+ return;
+
--pending_reads_;
// TODO(scherkus): this happens due to a race, primarily because Stop() is a

Powered by Google App Engine
This is Rietveld 408576698