diff --git a/dom/media/MediaDecoderStateMachine.cpp b/dom/media/MediaDecoderStateMachine.cpp index eef76bb243fe..cbfae1095cc4 100644 --- a/dom/media/MediaDecoderStateMachine.cpp +++ b/dom/media/MediaDecoderStateMachine.cpp @@ -1957,15 +1957,12 @@ public: 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);