Commit fc992372 by hschlueter Committed by Oliver Woodman

Reduce conditional nesting.

PiperOrigin-RevId: 413682281
parent fb37572b
......@@ -102,22 +102,24 @@ import java.io.IOException;
return false;
}
if (!frameEditor.hasInputData()) {
if (!waitingForPopulatedDecoderSurface) {
if (decoder.getOutputBufferInfo() != null) {
decoder.releaseOutputBuffer(/* render= */ true);
waitingForPopulatedDecoderSurface = true;
}
if (decoder.isEnded()) {
encoder.signalEndOfInputStream();
}
}
if (frameEditor.hasInputData()) {
waitingForPopulatedDecoderSurface = false;
frameEditor.processData();
return true;
}
if (waitingForPopulatedDecoderSurface) {
return false;
}
waitingForPopulatedDecoderSurface = false;
frameEditor.processData();
return true;
if (decoder.getOutputBufferInfo() != null) {
decoder.releaseOutputBuffer(/* render= */ true);
waitingForPopulatedDecoderSurface = true;
}
if (decoder.isEnded()) {
encoder.signalEndOfInputStream();
}
return false;
}
@Override
......
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