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;
|
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;
|
|||||||
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() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user