diff options
Diffstat (limited to 'media')
-rw-r--r-- | media/filters/audio_renderer_base.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/media/filters/audio_renderer_base.cc b/media/filters/audio_renderer_base.cc index 65829f6..4ec7403 100644 --- a/media/filters/audio_renderer_base.cc +++ b/media/filters/audio_renderer_base.cc @@ -131,6 +131,13 @@ void AudioRendererBase::OnReadComplete(Buffer* buffer_in) { DCHECK_GT(pending_reads_, 0u); --pending_reads_; + // TODO(scherkus): this happens due to a race, primarily because Stop() is a + // synchronous call when it should be asynchronous and accept a callback. + // Refer to http://crbug.com/16059 + if (state_ == kStopped) { + return; + } + // Don't enqueue an end-of-stream buffer because it has no data. if (buffer_in->IsEndOfStream()) { recieved_end_of_stream_ = true; |