Commit 81ca7fe0 by tonihei Committed by Oliver Woodman

Add missing call to timeline.getWindow.

The window object is used without being filled with data. This used to work
well for most cases as the same live stream is sending regular updates and the
first update is almost never used if it's not the first item in a playlist.

It causes problems when the first timeline update of a live stream is actually
used for playback (e.g. when the live stream is lazily prepared in a playlist
and played first).

PiperOrigin-RevId: 228530232
parent e7609655
......@@ -709,6 +709,7 @@ public class ConcatenatingMediaSource extends CompositeMediaSource<MediaSourceHo
// unlikely to be a problem as a non-zero default position usually only occurs for live
// playbacks and seeking to zero in a live window would cause BehindLiveWindowExceptions
// anyway.
timeline.getWindow(/* windowIndex= */ 0, window);
long windowStartPositionUs = window.getDefaultPositionUs();
if (deferredMediaPeriod != null) {
long periodPreparePositionUs = deferredMediaPeriod.getPreparePositionUs();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment