Skip to content

Commit

Permalink
Fix calling extra registerInputStream and not handling EOS
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 538796466
  • Loading branch information
claincly authored and tof-tof committed Jun 9, 2023
1 parent 53c174f commit a7cff4e
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,6 @@ public void onEnded() {
checkNotNull(defaultVideoFrameProcessor).registerInputStream(INPUT_TYPE_SURFACE);
defaultVideoFrameProcessor.setInputFrameInfo(
new FrameInfo.Builder(WIDTH, HEIGHT).build());
defaultVideoFrameProcessor.registerInputFrame();
blankFrameProducer.produceBlankFramesAndQueueEndOfStream(inputPresentationTimesUs);
defaultVideoFrameProcessor.signalEndOfInput();
});
Expand Down Expand Up @@ -398,7 +397,6 @@ public void produceBlankFramesAndQueueEndOfStream(long[] presentationTimesUs) {
for (long presentationTimeUs : presentationTimesUs) {
outputListener.onOutputFrameAvailable(checkNotNull(blankTexture), presentationTimeUs);
}
outputListener.onCurrentOutputStreamEnded();
}

@Override
Expand Down Expand Up @@ -426,8 +424,7 @@ public void releaseOutputFrame(GlTextureInfo outputTexture) {}

@Override
public void signalEndOfCurrentInputStream() {
// The tests don't end the input stream.
throw new UnsupportedOperationException();
checkNotNull(outputListener).onCurrentOutputStreamEnded();
}

@Override
Expand Down

0 comments on commit a7cff4e

Please sign in to comment.