Fix lost shader input capacity after end-of-stream

When exporting compositions with multiple images in a row, transformation could
get stuck if a shader was ready to accept input when end-of-stream was already
signaled and queued from upstream. Fix accounting for the downstream capacity.

Manually tested on concatenations with several images and several videos in a
row, by adding logging and verifying the capacity updates as expected across
edited media item transitions.

PiperOrigin-RevId: 532088793
(cherry picked from commit 6850391e45ed571f0190643189661b0920292084)
This commit is contained in:
andrewlewis 2023-05-15 14:16:53 +01:00 committed by Tofunmi Adigun-Hameed
parent 1ebf5c2a6a
commit 5722e6472a

View File

@ -65,6 +65,7 @@ import java.util.Queue;
long presentationTimeUs = pendingFrame.second; long presentationTimeUs = pendingFrame.second;
if (presentationTimeUs == C.TIME_END_OF_SOURCE) { if (presentationTimeUs == C.TIME_END_OF_SOURCE) {
consumingGlShaderProgramInputCapacity++;
videoFrameProcessingTaskExecutor.submit( videoFrameProcessingTaskExecutor.submit(
consumingGlShaderProgram::signalEndOfCurrentInputStream); consumingGlShaderProgram::signalEndOfCurrentInputStream);
} else { } else {