Reduce conditional nesting.
PiperOrigin-RevId: 413682281
This commit is contained in:
parent
fbbedf32f9
commit
14b849aba8
@ -102,8 +102,16 @@ import java.io.IOException;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!frameEditor.hasInputData()) {
|
||||
if (!waitingForPopulatedDecoderSurface) {
|
||||
if (frameEditor.hasInputData()) {
|
||||
waitingForPopulatedDecoderSurface = false;
|
||||
frameEditor.processData();
|
||||
return true;
|
||||
}
|
||||
|
||||
if (waitingForPopulatedDecoderSurface) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (decoder.getOutputBufferInfo() != null) {
|
||||
decoder.releaseOutputBuffer(/* render= */ true);
|
||||
waitingForPopulatedDecoderSurface = true;
|
||||
@ -111,15 +119,9 @@ import java.io.IOException;
|
||||
if (decoder.isEnded()) {
|
||||
encoder.signalEndOfInputStream();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
waitingForPopulatedDecoderSurface = false;
|
||||
frameEditor.processData();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public DecoderInputBuffer dequeueInputBuffer() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user