Skip to content

Commit

Permalink
Flush FrameProcessor when appropriate.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 507461550
  • Loading branch information
claincly authored and microkatz committed Feb 8, 2023
1 parent 91e611d commit 274617d
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1174,9 +1174,7 @@ protected boolean processOutputBuffer(
if (frameProcessorManager.isEnabled()) {
notifyFrameMetaDataListener = false;
if (!frameProcessorManager.maybeRegisterFrame(format, presentationTimeUs, isLastBuffer)) {
// TODO(b/238302341): Handle FrameProcessor is unable to accept the force rendered buffer.
// Treat the frame as dropped for now.
return true;
return false;
}
} else {
notifyFrameMetaDataListener = true;
Expand Down Expand Up @@ -1450,6 +1448,9 @@ protected boolean maybeDropBuffersToKeyframe(
droppedSourceBufferCount, /* droppedDecoderBufferCount= */ buffersInCodecCount);
}
flushOrReinitializeCodec();
if (frameProcessorManager.isEnabled()) {
frameProcessorManager.flush();
}
return true;
}

Expand Down

0 comments on commit 274617d

Please sign in to comment.