mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Mark every media3-cues
sample as a keyframe
This format doesn't require any context from previous samples, so every sample is a keyframe. PiperOrigin-RevId: 693658370
This commit is contained in:
parent
5336d71c22
commit
ab723fc8ff
@ -157,7 +157,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void outputSample(CuesWithTiming cuesWithTiming, long timeUs, int flags) {
|
private void outputSample(CuesWithTiming cuesWithTiming, long timeUs, @C.BufferFlags int flags) {
|
||||||
checkStateNotNull(currentFormat); // format() must be called before sampleMetadata()
|
checkStateNotNull(currentFormat); // format() must be called before sampleMetadata()
|
||||||
byte[] cuesWithDurationBytes =
|
byte[] cuesWithDurationBytes =
|
||||||
cueEncoder.encode(cuesWithTiming.cues, cuesWithTiming.durationUs);
|
cueEncoder.encode(cuesWithTiming.cues, cuesWithTiming.durationUs);
|
||||||
@ -174,7 +174,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
|||||||
}
|
}
|
||||||
delegate.sampleMetadata(
|
delegate.sampleMetadata(
|
||||||
outputSampleTimeUs,
|
outputSampleTimeUs,
|
||||||
flags,
|
flags | C.BUFFER_FLAG_KEY_FRAME,
|
||||||
cuesWithDurationBytes.length,
|
cuesWithDurationBytes.length,
|
||||||
/* offset= */ 0,
|
/* offset= */ 0,
|
||||||
/* cryptoData= */ null);
|
/* cryptoData= */ null);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user