Bug 1396268 - Seek operation should not be performed after GeckoHlsPlayer.release is called!
MozReview-Commit-ID: 15lXw9hgKdh
--- 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.