Skip to content

Commit

Permalink
Fix END_OF_STREAM transformer timestamp matching previous.
Browse files Browse the repository at this point in the history
This cause the muxer to fail to stop on older devices/API levels.

#minor-release

PiperOrigin-RevId: 407309028
  • Loading branch information
Samrobbo authored and tonihei committed Nov 3, 2021
1 parent 293cf2f commit f6e0790
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@
* Rename
`MediaSessionConnector.QueueNavigator#onCurrentWindowIndexChanged` to
`onCurrentMediaItemIndexChanged`.
* Transformer:
* Avoid sending a duplicate timestamp to the encoder with the end of
stream buffer.
* Remove deprecated symbols:
* Remove `Renderer.VIDEO_SCALING_MODE_*` constants. Use identically named
constants in `C` instead.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ private void feedEncoder(MediaCodecAdapterWrapper encoder, ByteBuffer inputBuffe

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.
Expand Down

0 comments on commit f6e0790

Please sign in to comment.