Commit fc992372 by hschlueter Committed by Oliver Woodman

Reduce conditional nesting.

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