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
  • Loading branch information
nielsvanvelzen committed Jan 3, 2025
1 parent d91d873 commit 38aa2f1
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 38aa2f1

Please sign in to comment.