mirror of
https://github.com/androidx/media.git
synced 2025-05-09 08:30:43 +08:00
Don't resolve UtcTiming element for static manifests
It doesn't do anything useful in this case. PiperOrigin-RevId: 223516909
This commit is contained in:
parent
ea483f8c8e
commit
beae7c9df5
@ -65,7 +65,7 @@ import java.util.List;
|
||||
private final DashChunkSource.Factory chunkSourceFactory;
|
||||
private final @Nullable TransferListener transferListener;
|
||||
private final LoadErrorHandlingPolicy loadErrorHandlingPolicy;
|
||||
private final long elapsedRealtimeOffset;
|
||||
private final long elapsedRealtimeOffsetMs;
|
||||
private final LoaderErrorThrower manifestLoaderErrorThrower;
|
||||
private final Allocator allocator;
|
||||
private final TrackGroupArray trackGroups;
|
||||
@ -93,7 +93,7 @@ import java.util.List;
|
||||
@Nullable TransferListener transferListener,
|
||||
LoadErrorHandlingPolicy loadErrorHandlingPolicy,
|
||||
EventDispatcher eventDispatcher,
|
||||
long elapsedRealtimeOffset,
|
||||
long elapsedRealtimeOffsetMs,
|
||||
LoaderErrorThrower manifestLoaderErrorThrower,
|
||||
Allocator allocator,
|
||||
CompositeSequenceableLoaderFactory compositeSequenceableLoaderFactory,
|
||||
@ -105,7 +105,7 @@ import java.util.List;
|
||||
this.transferListener = transferListener;
|
||||
this.loadErrorHandlingPolicy = loadErrorHandlingPolicy;
|
||||
this.eventDispatcher = eventDispatcher;
|
||||
this.elapsedRealtimeOffset = elapsedRealtimeOffset;
|
||||
this.elapsedRealtimeOffsetMs = elapsedRealtimeOffsetMs;
|
||||
this.manifestLoaderErrorThrower = manifestLoaderErrorThrower;
|
||||
this.allocator = allocator;
|
||||
this.compositeSequenceableLoaderFactory = compositeSequenceableLoaderFactory;
|
||||
@ -593,7 +593,7 @@ import java.util.List;
|
||||
trackGroupInfo.adaptationSetIndices,
|
||||
selection,
|
||||
trackGroupInfo.trackType,
|
||||
elapsedRealtimeOffset,
|
||||
elapsedRealtimeOffsetMs,
|
||||
enableEventMessageTrack,
|
||||
enableCea608Track,
|
||||
trackPlayerEmsgHandler,
|
||||
|
@ -710,17 +710,17 @@ public final class DashMediaSource extends BaseMediaSource {
|
||||
loadable.bytesLoaded());
|
||||
DashManifest newManifest = loadable.getResult();
|
||||
|
||||
int periodCount = manifest == null ? 0 : manifest.getPeriodCount();
|
||||
int oldPeriodCount = manifest == null ? 0 : manifest.getPeriodCount();
|
||||
int removedPeriodCount = 0;
|
||||
long newFirstPeriodStartTimeMs = newManifest.getPeriod(0).startMs;
|
||||
while (removedPeriodCount < periodCount
|
||||
while (removedPeriodCount < oldPeriodCount
|
||||
&& manifest.getPeriod(removedPeriodCount).startMs < newFirstPeriodStartTimeMs) {
|
||||
removedPeriodCount++;
|
||||
}
|
||||
|
||||
if (newManifest.dynamic) {
|
||||
boolean isManifestStale = false;
|
||||
if (periodCount - removedPeriodCount > newManifest.getPeriodCount()) {
|
||||
if (oldPeriodCount - removedPeriodCount > newManifest.getPeriodCount()) {
|
||||
// After discarding old periods, we should never have more periods than listed in the new
|
||||
// manifest. That would mean that a previously announced period is no longer advertised. If
|
||||
// this condition occurs, assume that we are hitting a manifest server that is out of sync
|
||||
@ -770,8 +770,8 @@ public final class DashMediaSource extends BaseMediaSource {
|
||||
}
|
||||
}
|
||||
|
||||
if (periodCount == 0) {
|
||||
if (manifest.utcTiming != null) {
|
||||
if (oldPeriodCount == 0) {
|
||||
if (manifest.dynamic && manifest.utcTiming != null) {
|
||||
resolveUtcTimingElement(manifest.utcTiming);
|
||||
} else {
|
||||
processManifest(true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user