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

Unified Diff: media/filters/audio_renderer_base.cc

Issue 8430015: Adding transition to kPlaying when end of stream is reached during an underflow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix windows build buster Created 9 years, 2 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 2d32d9821dea5c52f9a85a1c342a3e25324b1d09..2528a70f5a6608d71a4a4e6eca51d66b6ef269ca 100644
--- a/media/filters/audio_renderer_base.cc
+++ b/media/filters/audio_renderer_base.cc
@@ -162,6 +162,11 @@ void AudioRendererBase::ConsumeAudioSamples(scoped_refptr<Buffer> buffer_in) {
// discard decoded audio data until we reach our desired seek timestamp.
if (buffer_in->IsEndOfStream()) {
recieved_end_of_stream_ = true;
+
+ // Transition to kPlaying if we are currently handling an underflow since no
+ // more data will be arriving.
+ if (state_ == kUnderflow || state_ == kRebuffering)
+ state_ = kPlaying;
} else if (state_ == kSeeking && !buffer_in->IsEndOfStream() &&
(buffer_in->GetTimestamp() + buffer_in->GetDuration()) <
seek_timestamp_) {
« 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