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

Unified Diff: media/base/pipeline_impl.cc

Issue 1819023002: Merge M50: "Supress pipeline errors during destruction and suspend." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
Patch Set: Created 4 years, 9 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 c0b29af1890d80d909c49cc9f1f044a6c41a1500..f47849d8aedc046bb1e80caded955a06a95ce67f 100644
--- a/media/base/pipeline_impl.cc
+++ b/media/base/pipeline_impl.cc
@@ -585,10 +585,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