Bug 1136984 - Always call DrainComplete in response to Drain, even if it wasn't called on the active decoder. r=cpearce a=lmandel
authorMatt Woodrow <mwoodrow@mozilla.com>
Fri, 27 Feb 2015 11:47:12 +1300
changeset 250138 5a7e83327249
parent 250137 e49cd895e078
child 250139 09b2c7fed10f
push id4512
push userrgiles@mozilla.com
push date2015-03-02 18:00 +0000
treeherdermozilla-beta@09b2c7fed10f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpearce, lmandel
bugs1136984
milestone37.0
Bug 1136984 - Always call DrainComplete in response to Drain, even if it wasn't called on the active decoder. r=cpearce a=lmandel
dom/media/fmp4/SharedDecoderManager.cpp
--- a/dom/media/fmp4/SharedDecoderManager.cpp
+++ b/dom/media/fmp4/SharedDecoderManager.cpp
@@ -191,18 +191,20 @@ SharedDecoderProxy::Flush()
   return NS_OK;
 }
 
 nsresult
 SharedDecoderProxy::Drain()
 {
   if (mManager->mActiveProxy == this) {
     return mManager->mDecoder->Drain();
+  } else {
+    mCallback->DrainComplete();
+    return NS_OK;
   }
-  return NS_OK;
 }
 
 nsresult
 SharedDecoderProxy::Shutdown()
 {
   mManager->SetIdle(this);
   return NS_OK;
 }