mirror of
https://github.com/samsonjs/media.git
synced 2026-03-26 09:35:47 +00:00
Reduce conditional nesting.
PiperOrigin-RevId: 413682281
This commit is contained in:
parent
fb37572bcb
commit
fc99237263
1 changed files with 15 additions and 13 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue