Fix bug: playback is frozen with HLS chunkless preparation

This change fixes a bug where the player is frozen with HLS chunkless
preparation because the audio stream wrappers are not marked as master
timestamp sources before preparation.

#minor-release

PiperOrigin-RevId: 453941815
(cherry picked from commit 917484100db2be8681f5a122d876012c1dd0f36b)
This commit is contained in:
christosts 2022-06-09 16:19:51 +00:00 committed by Marc Baechinger
parent 56079ba84e
commit b7cf772afb

View File

@ -553,8 +553,10 @@ public final class HlsMediaPeriod
this.sampleStreamWrappers = sampleStreamWrappers.toArray(new HlsSampleStreamWrapper[0]);
this.manifestUrlIndicesPerWrapper = manifestUrlIndicesPerWrapper.toArray(new int[0][]);
pendingPrepareCount = this.sampleStreamWrappers.length;
// Set timestamp master and trigger preparation (if not already prepared)
this.sampleStreamWrappers[0].setIsTimestampMaster(true);
// Set timestamp masters and trigger preparation (if not already prepared)
for (int i = 0; i < audioVideoSampleStreamWrapperCount; i++) {
this.sampleStreamWrappers[i].setIsTimestampMaster(true);
}
for (HlsSampleStreamWrapper sampleStreamWrapper : this.sampleStreamWrappers) {
sampleStreamWrapper.continuePreparing();
}