Bug 1396268 - Seek operation should not be performed after GeckoHlsPlayer.release is called! r=JamesCheng
authorKilik Kuo <kikuo@mozilla.com>
Thu, 07 Sep 2017 17:00:32 +0800
changeset 379490 0cd3d257e736de5b2bee172b22b04aef74bf26c8
parent 379489 8b18f545fd6f7dd341010b041bd248a1e726bc13
child 379491 572f37089603abbec3de4cd6d375e723c9c30cb1
push id32455
push userarchaeopteryx@coole-files.de
push dateThu, 07 Sep 2017 21:50:54 +0000
treeherdermozilla-central@64bf417d1bdf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersJamesCheng
bugs1396268
milestone57.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 1396268 - Seek operation should not be performed after GeckoHlsPlayer.release is called! r=JamesCheng MozReview-Commit-ID: 15lXw9hgKdh
mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/GeckoHlsPlayer.java
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/GeckoHlsPlayer.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/GeckoHlsPlayer.java
@@ -678,16 +678,21 @@ public class GeckoHlsPlayer implements B
                                                   16, 0, getDuration(),
                                                   fmt.sampleMimeType, csd);
         return aInfo;
     }
 
     // Called on HLSDemuxer's TaskQueue
     @Override
     public synchronized boolean seek(long positionUs) {
+        if (mPlayer == null) {
+            Log.d(LOGTAG, "Seek operation won't be performed as no player exists!");
+            return false;
+        }
+
         // Need to temporarily resume Exoplayer to download the chunks for getting the demuxed
         // keyframe sample when HTMLMediaElement is paused. Suspend Exoplayer when collecting enough
         // samples in onLoadingChanged.
         if (mExoplayerSuspended) {
             resumeExoplayer();
         }
         // positionUs : microseconds.
         // NOTE : 1) It's not possible to seek media by tracktype via ExoPlayer Interface.