mirror of
https://github.com/androidx/media.git
synced 2025-05-16 03:59:54 +08:00
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
This commit is contained in:
parent
58e5ed0afb
commit
9b2cd6a4e9
@ -69,14 +69,12 @@ import java.nio.ByteBuffer;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!ensureDecoderConfigured()) {
|
||||
if (!ensureEncoderConfigured() || !ensureDecoderConfigured()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (ensureEncoderConfigured()) {
|
||||
while (feedMuxerFromEncoder()) {}
|
||||
while (feedEncoderFromDecoder()) {}
|
||||
}
|
||||
while (feedMuxerFromEncoder()) {}
|
||||
while (feedEncoderFromDecoder()) {}
|
||||
while (feedDecoderFromInput()) {}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user