mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Don't drop frames to ignore in RenderControl
The following was happening: - VideoFrameRenderControl.render() was calling VideoFrameReleaseAction.getFrameReleaseAction(). - VideoFrameReleaseAction.getFrameReleaseAction() was calling FrameTimingEvaluator.shouldIgnoreFrame(), which is implemented in MediaCodecVideoRenderer. - MediaCodecVideoRenderer.shouldIgnoreFrame(), when returning true, was also flushing the VideoSink, which was flushing the VideoFrameRenderControl. - VideoFrameRenderControl.render() was removing the frame from the presentationTimestampsUs queue, but the frame had already been removed by the flush operation, causing an exception to be thrown. This fix removes the last step. PiperOrigin-RevId: 697915692
This commit is contained in:
parent
9c6d9e9e47
commit
b782cdff52
@ -160,11 +160,13 @@ import androidx.media3.exoplayer.ExoPlaybackException;
|
||||
return;
|
||||
case VideoFrameReleaseControl.FRAME_RELEASE_SKIP:
|
||||
case VideoFrameReleaseControl.FRAME_RELEASE_DROP:
|
||||
lastOutputPresentationTimeUs = presentationTimeUs;
|
||||
dropFrame();
|
||||
break;
|
||||
case VideoFrameReleaseControl.FRAME_RELEASE_IGNORE:
|
||||
// TODO b/293873191 - Handle very late buffers and drop to key frame. Need to flush
|
||||
// VideoGraph input frames in this case.
|
||||
lastOutputPresentationTimeUs = presentationTimeUs;
|
||||
dropFrame();
|
||||
break;
|
||||
case VideoFrameReleaseControl.FRAME_RELEASE_IMMEDIATELY:
|
||||
case VideoFrameReleaseControl.FRAME_RELEASE_SCHEDULED:
|
||||
|
Loading…
x
Reference in New Issue
Block a user