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

Unified Diff: media/base/pipeline_impl.cc

Issue 1753043002: Supress pipeline errors during destruction and suspend. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comment style. Created 4 years, 10 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 | « media/base/demuxer.h ('k') | media/base/pipeline_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/pipeline_impl.cc
diff --git a/media/base/pipeline_impl.cc b/media/base/pipeline_impl.cc
index a9ee4f0d1379a9f992b495df12bb895bee1737e4..085e5496c8796287019baff8b4beac7a938b7c54 100644
--- a/media/base/pipeline_impl.cc
+++ b/media/base/pipeline_impl.cc
@@ -583,10 +583,16 @@ void PipelineImpl::ErrorChangedTask(PipelineStatus error) {
DCHECK(task_runner_->BelongsToCurrentThread());
DCHECK_NE(PIPELINE_OK, error) << "PIPELINE_OK isn't an error!";
- media_log_->AddEvent(media_log_->CreatePipelineErrorEvent(error));
-
- if (state_ == kStopping || state_ == kStopped)
+ // Don't report pipeline error events to the media log here. The embedder will
+ // log this when |error_cb_| is called. If the pipeline is already stopped or
+ // stopping we also don't want to log any event. In case we are suspending or
+ // suspended, the error may be recoverable, so don't propagate it now, instead
+ // let the subsequent seek during resume propagate it if it's unrecoverable.
+
+ if (state_ == kStopping || state_ == kStopped || state_ == kSuspending ||
+ state_ == kSuspended) {
return;
+ }
SetState(kStopping);
pending_callbacks_.reset();
« no previous file with comments | « media/base/demuxer.h ('k') | media/base/pipeline_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698