Bug 1316506 - Make sure we flush decoders before shutting them down. r=jya
authorMatt Woodrow <mwoodrow@mozilla.com>
Sun, 13 Nov 2016 14:18:28 +1300
changeset 322364 dedcf267805459f689b41aacd19907519bbd9131
parent 322363 f210f6b4c5cdebd39c76355d19947562d8dc2c29
child 322365 94e24024f3d963c0d25c17be2b2a4c292d001f69
push id30945
push usercbook@mozilla.com
push dateMon, 14 Nov 2016 09:22:29 +0000
treeherdermozilla-central@1196bf3032e1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjya
bugs1316506
milestone52.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 1316506 - Make sure we flush decoders before shutting them down. r=jya
dom/media/MediaFormatReader.cpp
--- a/dom/media/MediaFormatReader.cpp
+++ b/dom/media/MediaFormatReader.cpp
@@ -195,16 +195,17 @@ 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);