Commit f6e0790a by samrobinson Committed by tonihei

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
parent 293cf2f8
...@@ -90,6 +90,9 @@ ...@@ -90,6 +90,9 @@
* Rename * Rename
`MediaSessionConnector.QueueNavigator#onCurrentWindowIndexChanged` to `MediaSessionConnector.QueueNavigator#onCurrentWindowIndexChanged` to
`onCurrentMediaItemIndexChanged`. `onCurrentMediaItemIndexChanged`.
* Transformer:
* Avoid sending a duplicate timestamp to the encoder with the end of
stream buffer.
* Remove deprecated symbols: * Remove deprecated symbols:
* Remove `Renderer.VIDEO_SCALING_MODE_*` constants. Use identically named * Remove `Renderer.VIDEO_SCALING_MODE_*` constants. Use identically named
constants in `C` instead. constants in `C` instead.
......
...@@ -316,6 +316,7 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull; ...@@ -316,6 +316,7 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
private void queueEndOfStreamToEncoder(MediaCodecAdapterWrapper encoder) { private void queueEndOfStreamToEncoder(MediaCodecAdapterWrapper encoder) {
checkState(checkNotNull(encoderInputBuffer.data).position() == 0); checkState(checkNotNull(encoderInputBuffer.data).position() == 0);
encoderInputBuffer.timeUs = nextEncoderInputBufferTimeUs;
encoderInputBuffer.addFlag(C.BUFFER_FLAG_END_OF_STREAM); encoderInputBuffer.addFlag(C.BUFFER_FLAG_END_OF_STREAM);
encoderInputBuffer.flip(); encoderInputBuffer.flip();
// Queuing EOS should only occur with an empty buffer. // Queuing EOS should only occur with an empty buffer.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment