Commit 470ec9e5 by andrewlewis Committed by Oliver Woodman

Init the ads manager for placeholder timelines

It looks like loading ad cue points would cause a source info refresh
causing the content media period load to be canceled, meaning we would
never get a non-placeholder timeline.

This changes ensures that the ads manager will still be initialized,
avoiding playback getting stuck when playing a ProgressiveMediaPeriod
with a preroll ad.

PiperOrigin-RevId: 298814758
parent d8ea1f60
......@@ -967,10 +967,6 @@ public final class ImaAdsLoader
return;
}
Assertions.checkArgument(timeline.getPeriodCount() == 1);
if (timeline.getWindow(/* windowIndex= */ 0, window).isPlaceholder) {
// This is just a placeholder. Wait until we get the fully prepared timeline.
return;
}
this.timeline = timeline;
long contentDurationUs = timeline.getPeriod(/* periodIndex= */ 0, period).durationUs;
contentDurationMs = C.usToMs(contentDurationUs);
......
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