Bug 1367983 - revert the change of bug1367980. r=jwwang
☠☠ backed out by a2058025fd77 ☠ ☠
authorAlastor Wu <alwu@mozilla.com>
Mon, 24 Jul 2017 10:07:30 +0800
changeset 419200 42667c5ba946a1d9341d7d7ac4871ee46396de35
parent 419199 92ca759469c928983c2a06de59499f6b5dc46704
child 419201 a0181f9fc90a915f5762b64165e8968715c7ff11
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwwang
bugs1367983, 1367980, 1371202
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1367983 - revert the change of bug1367980. r=jwwang In bug1371202, it has already implemented what I want to do, so remove the change in bug1367980. MozReview-Commit-ID: LoH51bBDTqr
dom/media/MediaDecoderStateMachine.cpp
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -1952,25 +1952,22 @@ private:
 class MediaDecoderStateMachine::CompletedState
   : public MediaDecoderStateMachine::StateObject
 {
 public:
   explicit CompletedState(Master* aPtr) : StateObject(aPtr) { }
 
   void Enter()
   {
-    // TODO : use more approriate way to decide whether need to release
-    // resource in bug1367983.
-#ifndef MOZ_WIDGET_ANDROID
     if (!mMaster->mLooping) {
       // We've decoded all samples.
       // We don't need decoders anymore if not looping.
       Reader()->ReleaseResources();
     }
-#endif
+
     bool hasNextFrame = (!mMaster->HasAudio() || !mMaster->mAudioCompleted)
                         && (!mMaster->HasVideo() || !mMaster->mVideoCompleted);
 
     mMaster->UpdateNextFrameStatus(
       hasNextFrame ? MediaDecoderOwner::NEXT_FRAME_AVAILABLE
                    : MediaDecoderOwner::NEXT_FRAME_UNAVAILABLE);
 
     Step();