summaryrefslogtreecommitdiffstats
path: root/media/base/pipeline.cc
diff options
context:
space:
mode:
Diffstat (limited to 'media/base/pipeline.cc')
-rw-r--r--media/base/pipeline.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/media/base/pipeline.cc b/media/base/pipeline.cc
index efe91f6..f238d66 100644
--- a/media/base/pipeline.cc
+++ b/media/base/pipeline.cc
@@ -494,6 +494,9 @@ void Pipeline::DoSeek(
void Pipeline::DoStop(const PipelineStatusCB& done_cb) {
DCHECK(task_runner_->BelongsToCurrentThread());
DCHECK(!pending_callbacks_.get());
+
+ audio_renderer_.reset();
+
SerialRunner::Queue bound_fns;
if (demuxer_) {
@@ -501,11 +504,6 @@ void Pipeline::DoStop(const PipelineStatusCB& done_cb) {
&Demuxer::Stop, base::Unretained(demuxer_)));
}
- if (audio_renderer_) {
- bound_fns.Push(base::Bind(
- &AudioRenderer::Stop, base::Unretained(audio_renderer_.get())));
- }
-
if (video_renderer_) {
bound_fns.Push(base::Bind(
&VideoRenderer::Stop, base::Unretained(video_renderer_.get())));
@@ -522,6 +520,7 @@ void Pipeline::DoStop(const PipelineStatusCB& done_cb) {
void Pipeline::OnStopCompleted(PipelineStatus status) {
DCHECK(task_runner_->BelongsToCurrentThread());
DCHECK_EQ(state_, kStopping);
+ DCHECK(!audio_renderer_);
{
base::AutoLock l(lock_);
running_ = false;
@@ -530,7 +529,6 @@ void Pipeline::OnStopCompleted(PipelineStatus status) {
SetState(kStopped);
pending_callbacks_.reset();
filter_collection_.reset();
- audio_renderer_.reset();
video_renderer_.reset();
text_renderer_.reset();
demuxer_ = NULL;