Commit fc992372 by hschlueter Committed by Oliver Woodman

Reduce conditional nesting.

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