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

Unified Diff: media/remoting/courier_renderer.cc

Issue 2669033004: Media Remoting: Don't report remote renderer init error to pipeline. (Closed)
Patch Set: Addressed comments. Created 3 years, 11 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 | « no previous file | media/remoting/courier_renderer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/remoting/courier_renderer.cc
diff --git a/media/remoting/courier_renderer.cc b/media/remoting/courier_renderer.cc
index b83c7f751440db55a06de12b25d0bc3524dd3521..f8443b1290a4629d4d7de473a8a4e9013d05c0a2 100644
--- a/media/remoting/courier_renderer.cc
+++ b/media/remoting/courier_renderer.cc
@@ -319,11 +319,11 @@ void CourierRenderer::OnDataPipeCreated(
int video_rpc_handle) {
VLOG(2) << __func__;
DCHECK(media_task_runner_->BelongsToCurrentThread());
- DCHECK(!init_workflow_done_callback_.is_null());
if (state_ == STATE_ERROR)
return; // Abort because something went wrong in the meantime.
DCHECK_EQ(state_, STATE_CREATE_PIPE);
+ DCHECK(!init_workflow_done_callback_.is_null());
// Create audio demuxer stream adapter if audio is available.
DemuxerStream* audio_demuxer_stream =
@@ -673,9 +673,10 @@ void CourierRenderer::OnFatalError(StopTrigger stop_trigger) {
data_flow_poll_timer_.Stop();
+ // This renderer will be shut down shortly. To prevent breaking the pipeline,
+ // just run the callback without reporting error.
if (!init_workflow_done_callback_.is_null()) {
- base::ResetAndReturn(&init_workflow_done_callback_)
- .Run(PIPELINE_ERROR_INITIALIZATION_FAILED);
+ base::ResetAndReturn(&init_workflow_done_callback_).Run(PIPELINE_OK);
return;
}
« no previous file with comments | « no previous file | media/remoting/courier_renderer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698