Use INDEX_UNSET instead of LENGTH_UNSET for next media sequence/part

Both constants have the same value, but the method returning initial values for the media sequence/part uses `INDEX_UNSET`, so it makes sense to use it.

PiperOrigin-RevId: 638673282
This commit is contained in:
rohks 2024-05-30 09:06:51 -07:00 committed by Copybara-Service
parent d598eb064d
commit 8c8bf1334e

View File

@ -512,10 +512,10 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
: CmcdData.Factory.getObjectType(trackSelection));
long nextChunkMediaSequence =
partIndex == C.LENGTH_UNSET
? (chunkMediaSequence == C.LENGTH_UNSET ? C.LENGTH_UNSET : chunkMediaSequence + 1)
partIndex == C.INDEX_UNSET
? (chunkMediaSequence == C.INDEX_UNSET ? C.INDEX_UNSET : chunkMediaSequence + 1)
: chunkMediaSequence;
int nextPartIndex = partIndex == C.LENGTH_UNSET ? C.LENGTH_UNSET : partIndex + 1;
int nextPartIndex = partIndex == C.INDEX_UNSET ? C.INDEX_UNSET : partIndex + 1;
SegmentBaseHolder nextSegmentBaseHolder =
getNextSegmentHolder(playlist, nextChunkMediaSequence, nextPartIndex);
if (nextSegmentBaseHolder != null) {