| Index: media/filters/audio_renderer_base.cc
|
| diff --git a/media/filters/audio_renderer_base.cc b/media/filters/audio_renderer_base.cc
|
| index 712fc45af3e01c12e57aba8e8fbe30bf2ec60986..f07a4c2ca326de632052948863ff0a48d20c55c1 100644
|
| --- a/media/filters/audio_renderer_base.cc
|
| +++ b/media/filters/audio_renderer_base.cc
|
| @@ -192,8 +192,10 @@ uint32 AudioRendererBase::FillBuffer(uint8* dest,
|
| last_fill_buffer_time = last_fill_buffer_time_;
|
| last_fill_buffer_time_ = base::TimeDelta();
|
|
|
| - // Check if we finally reached end of stream by emptying |algorithm_|.
|
| - if (algorithm_->IsQueueEmpty()) {
|
| + // Use two conditions to determine the end of playback:
|
| + // 1. Algorithm has no audio data.
|
| + // 2. Browser process has no audio data.
|
| + if (algorithm_->IsQueueEmpty() && !playback_delay.ToInternalValue()) {
|
| if (recieved_end_of_stream_ && !rendered_end_of_stream_) {
|
| rendered_end_of_stream_ = true;
|
| host()->NotifyEnded();
|
|
|