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

Unified Diff: media/filters/audio_renderer_base.cc

Issue 165023: Renderer busy looping after video (with sound) or audio ends (Closed)
Patch Set: rename Created 11 years, 4 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 | « no previous file | media/filters/audio_renderer_base_unittest.cc » ('j') | 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 cd92bf304aff09333185aaab52e1a6588d899a08..681bfb2e6246251d0214e7011fba041a49e8ee2f 100644
--- a/media/filters/audio_renderer_base.cc
+++ b/media/filters/audio_renderer_base.cc
@@ -120,8 +120,11 @@ void AudioRendererBase::OnReadComplete(Buffer* buffer_in) {
DCHECK_GT(pending_reads_, 0u);
--pending_reads_;
- // Note: Calling this may schedule more reads.
- algorithm_->EnqueueBuffer(buffer_in);
+ // Don't enqueue an end-of-stream buffer because it has no data.
+ if (!buffer_in->IsEndOfStream()) {
+ // Note: Calling this may schedule more reads.
+ algorithm_->EnqueueBuffer(buffer_in);
+ }
// Check for our preroll complete condition.
if (state_ == kSeeking) {
« no previous file with comments | « no previous file | media/filters/audio_renderer_base_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698