Skip to content

Commit

Permalink
Prevent seeking from crashing app if video info is not initialized yet
Browse files Browse the repository at this point in the history
(cherry picked from commit 38aa2f1)
  • Loading branch information
nielsvanvelzen committed Jan 6, 2025
1 parent f783996 commit 0912212
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,8 @@ public void seek(long pos, boolean skipToNext) {
// set seekPosition so real position isn't used until playback starts again
mSeekPosition = pos;

if (mCurrentStreamInfo == null) return;

// rebuild the stream
// if an older device uses exoplayer to play a transcoded stream but falls back to the generic http stream instead of hls, rebuild the stream
if (!mVideoManager.isSeekable()) {
Expand Down

0 comments on commit 0912212

Please sign in to comment.