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
This commit is contained in:
parent
e760965595
commit
81ca7fe090
@ -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
|
// 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
|
// playbacks and seeking to zero in a live window would cause BehindLiveWindowExceptions
|
||||||
// anyway.
|
// anyway.
|
||||||
|
timeline.getWindow(/* windowIndex= */ 0, window);
|
||||||
long windowStartPositionUs = window.getDefaultPositionUs();
|
long windowStartPositionUs = window.getDefaultPositionUs();
|
||||||
if (deferredMediaPeriod != null) {
|
if (deferredMediaPeriod != null) {
|
||||||
long periodPreparePositionUs = deferredMediaPeriod.getPreparePositionUs();
|
long periodPreparePositionUs = deferredMediaPeriod.getPreparePositionUs();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user