Fix END_OF_STREAM transformer timestamp matching previous.

This cause the muxer to fail to stop on older devices/API levels.

#minor-release

PiperOrigin-RevId: 407309028
This commit is contained in:
samrobinson 2021-11-03 11:57:41 +00:00 committed by Ian Baker
parent 7168f93829
commit 9c32d5ac46

View File

@ -316,6 +316,7 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
private void queueEndOfStreamToEncoder(MediaCodecAdapterWrapper encoder) {
checkState(checkNotNull(encoderInputBuffer.data).position() == 0);
encoderInputBuffer.timeUs = nextEncoderInputBufferTimeUs;
encoderInputBuffer.addFlag(C.BUFFER_FLAG_END_OF_STREAM);
encoderInputBuffer.flip();
// Queuing EOS should only occur with an empty buffer.