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

Unified Diff: media/filters/chunk_demuxer.cc

Issue 827013005: Avoid double task trampoline for Pipeline state transitions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix MojoRendererImpl. Created 5 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
Index: media/filters/chunk_demuxer.cc
diff --git a/media/filters/chunk_demuxer.cc b/media/filters/chunk_demuxer.cc
index 1b57c3a1b18d35587bf6f07e8b2f6a68c258f15f..92761805200fb94ecdae19372577b730420314f0 100644
--- a/media/filters/chunk_demuxer.cc
+++ b/media/filters/chunk_demuxer.cc
@@ -1132,7 +1132,9 @@ void ChunkDemuxer::Initialize(
base::AutoLock auto_lock(lock_);
+ // Always post the callback because |this| could be destroyed upon failure.
init_cb_ = BindToCurrentLoop(cb);
+
if (state_ == SHUTDOWN) {
base::ResetAndReturn(&init_cb_).Run(DEMUXER_ERROR_COULD_NOT_OPEN);
return;

Powered by Google App Engine
This is Rietveld 408576698