Bug 1351370 - Don't flush a decoder before shutdown that is not used for decoding at all. r=jya, a=lizzard
authorJW Wang <jwwang@mozilla.com>
Wed, 29 Mar 2017 11:21:33 +0800
changeset 379368 f7dcb07ca4185b53afa16a692e0a9fcaedbc3b4b
parent 379367 91ca571410f212407aa7abacef30d753d31e3821
child 379369 a46fdd9244c6ab2efc30c97bf69d19d0baf16e80
push id1419
push userjlund@mozilla.com
push dateMon, 10 Apr 2017 20:44:07 +0000
treeherdermozilla-release@5e6801b73ef6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjya, lizzard
bugs1351370
milestone53.0
Bug 1351370 - Don't flush a decoder before shutdown that is not used for decoding at all. r=jya, a=lizzard The decoder held by MediaFormatReader::DecoderFactory::Data is never used for decoding. There is no need to flush it before shutdown. This will avoid the hang on Android caused by flushing a decoder that is not initialized.
dom/media/MediaFormatReader.cpp
--- a/dom/media/MediaFormatReader.cpp
+++ b/dom/media/MediaFormatReader.cpp
@@ -214,17 +214,16 @@ private:
     RefPtr<MediaDataDecoder> mDecoder;
     MozPromiseRequestHolder<TokenPromise> mTokenPromise;
     MozPromiseRequestHolder<InitPromise> mInitPromise;
     ~Data()
     {
       mTokenPromise.DisconnectIfExists();
       mInitPromise.DisconnectIfExists();
       if (mDecoder) {
-        mDecoder->Flush();
         mDecoder->Shutdown();
       }
     }
   } mAudio, mVideo;
 
   void RunStage(TrackType aTrack);
   MediaResult DoCreateDecoder(TrackType aTrack);
   void DoInitDecoder(TrackType aTrack);