Remove unnecessary call in MediaCodecVideoRenderer

Before this CL, the FrameMetadataListener was set in
onReadyToInitializeCodec while it had already been set when handling
message MSG_SET_VIDEO_FRAME_METADATA_LISTENER.

PiperOrigin-RevId: 624940824
This commit is contained in:
kimvde 2024-04-15 06:35:43 -07:00 committed by Copybara-Service
parent a701c2f035
commit 42335893da

View File

@ -1065,9 +1065,6 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer
if (hasEffects && !hasInitializedPlayback && !videoSinkProvider.isInitialized()) { if (hasEffects && !hasInitializedPlayback && !videoSinkProvider.isInitialized()) {
try { try {
videoSinkProvider.initialize(format); videoSinkProvider.initialize(format);
if (frameMetadataListener != null) {
videoSinkProvider.setVideoFrameMetadataListener(frameMetadataListener);
}
if (displaySurface != null && outputResolution != null) { if (displaySurface != null && outputResolution != null) {
videoSinkProvider.setOutputSurfaceInfo(displaySurface, outputResolution); videoSinkProvider.setOutputSurfaceInfo(displaySurface, outputResolution);
} }