Transformer: avoid retrieving the video decoded bytes

Decoded video frames can be large and there is no need to retrieve the
corresponding ByteBuffer as we render the decoded frames on a surface
for better performance.

PiperOrigin-RevId: 405364950
This commit is contained in:
kimvde 2021-10-25 12:05:41 +01:00 committed by Oliver Woodman
parent 1f3f22a709
commit 17d2f5a0b1

View File

@ -305,7 +305,7 @@ import java.nio.ByteBuffer;
if (!isDecoderSurfacePopulated) { if (!isDecoderSurfacePopulated) {
if (!waitingForPopulatedDecoderSurface) { if (!waitingForPopulatedDecoderSurface) {
if (decoder.getOutputBuffer() != null) { if (decoder.getOutputBufferInfo() != null) {
decoder.releaseOutputBuffer(/* render= */ true); decoder.releaseOutputBuffer(/* render= */ true);
waitingForPopulatedDecoderSurface = true; waitingForPopulatedDecoderSurface = true;
} }