mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Reduce conditional nesting.
PiperOrigin-RevId: 413682281
This commit is contained in:
parent
fbbedf32f9
commit
14b849aba8
1 changed files with 15 additions and 13 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue