Allow negative presentation time in ReorderingSeiMessageQueue
PiperOrigin-RevId: 653170404
This commit is contained in:
parent
e78802d0d8
commit
3b8ea4a412
@ -154,7 +154,7 @@ public final class ReorderingSeiMessageQueue {
|
||||
}
|
||||
|
||||
public void reset(long presentationTimeUs, long tieBreak, ParsableByteArray nalBuffer) {
|
||||
checkState(presentationTimeUs >= 0);
|
||||
checkState(presentationTimeUs != C.TIME_UNSET);
|
||||
this.presentationTimeUs = presentationTimeUs;
|
||||
this.tieBreak = tieBreak;
|
||||
this.data.reset(nalBuffer.bytesLeft());
|
||||
|
@ -109,10 +109,10 @@ public final class ReorderingSeiMessageQueueTest {
|
||||
|
||||
byte[] data2 = TestUtil.buildTestData(10);
|
||||
scratchData.reset(data2);
|
||||
reorderingQueue.add(/* presentationTimeUs= */ 123, scratchData);
|
||||
reorderingQueue.add(/* presentationTimeUs= */ -123, scratchData);
|
||||
|
||||
assertThat(emittedMessages)
|
||||
.containsExactly(new SeiMessage(/* presentationTimeUs= */ 123, data2));
|
||||
.containsExactly(new SeiMessage(/* presentationTimeUs= */ -123, data2));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user