Commit 9b2cd6a4 by kimvde Committed by bachinger

Fix NPE in TransformerTranscodingVideoRenderer

The NPE was caused by the fact that the encoder surface was passed to
the decoder before configuring the encoder.

PiperOrigin-RevId: 393349794
parent 58e5ed0a
...@@ -69,14 +69,12 @@ import java.nio.ByteBuffer; ...@@ -69,14 +69,12 @@ import java.nio.ByteBuffer;
return; return;
} }
if (!ensureDecoderConfigured()) { if (!ensureEncoderConfigured() || !ensureDecoderConfigured()) {
return; return;
} }
if (ensureEncoderConfigured()) { while (feedMuxerFromEncoder()) {}
while (feedMuxerFromEncoder()) {} while (feedEncoderFromDecoder()) {}
while (feedEncoderFromDecoder()) {}
}
while (feedDecoderFromInput()) {} while (feedDecoderFromInput()) {}
} }
......
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