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

Unified Diff: media/filters/chunk_demuxer.cc

Issue 11669011: Fix ChunkDemuxer to handle a Shutdown() call before Initialize() is called. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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/filters/chunk_demuxer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/chunk_demuxer.cc
diff --git a/media/filters/chunk_demuxer.cc b/media/filters/chunk_demuxer.cc
index c24528177205f062772182f12f58d951e3766237..092fa4f8b0f3b5bd46121d2a1b628343b64374d0 100644
--- a/media/filters/chunk_demuxer.cc
+++ b/media/filters/chunk_demuxer.cc
@@ -561,6 +561,12 @@ void ChunkDemuxer::Initialize(DemuxerHost* host, const PipelineStatusCB& cb) {
DVLOG(1) << "Init()";
base::AutoLock auto_lock(lock_);
+
+ if (state_ == SHUTDOWN) {
+ base::MessageLoopProxy::current()->PostTask(FROM_HERE, base::Bind(
+ cb, DEMUXER_ERROR_COULD_NOT_OPEN));
+ return;
+ }
DCHECK_EQ(state_, WAITING_FOR_INIT);
host_ = host;
« no previous file with comments | « no previous file | media/filters/chunk_demuxer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698