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

Unified Diff: media/base/composite_filter.cc

Issue 9310028: Update AudioRenderer, VideoRenderer, and AudioDecoder Initialize() methods to use PipelineStatusCB. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix AudioRendererImplTest Created 8 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 | « content/renderer/media/audio_renderer_impl_unittest.cc ('k') | media/base/composite_filter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/composite_filter.cc
diff --git a/media/base/composite_filter.cc b/media/base/composite_filter.cc
index 2b0166c5b00466d96833feae010bd2a1385b0e7c..4b21ffff7238254a3765f10f5082751c807d9420 100644
--- a/media/base/composite_filter.cc
+++ b/media/base/composite_filter.cc
@@ -443,17 +443,6 @@ void CompositeFilter::OnStatusCB(const base::Closure& callback,
}
void CompositeFilter::SetError(PipelineStatus error) {
- // TODO(acolwell): Temporary hack to handle errors that occur
- // during filter initialization. In this case we just forward
- // the error to the host even if it is on the wrong thread. We
- // have to do this because if we defer the call, we can't be
- // sure the host will get the error before the "init done" callback
- // is executed. This will be cleaned up when filter init is refactored.
- if (state_ == kCreated) {
- SendErrorToHost(error);
- return;
- }
-
if (message_loop_ != MessageLoop::current()) {
message_loop_->PostTask(FROM_HERE,
base::Bind(&CompositeFilter::SetError, this, error));
@@ -461,6 +450,7 @@ void CompositeFilter::SetError(PipelineStatus error) {
}
DCHECK_EQ(message_loop_, MessageLoop::current());
+ DCHECK_NE(state_, kCreated);
// Drop errors recieved while stopping or stopped.
// This shields the owner of this object from having
« no previous file with comments | « content/renderer/media/audio_renderer_impl_unittest.cc ('k') | media/base/composite_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698