Fix not setting videoEffect in CompositingVSP

The current code only set the videoEffects when CVSP is initialized, which
happens after `player.prepare()`. But it's valid that videoEffects are set
before calling `prepare()`.

PiperOrigin-RevId: 566941216
This commit is contained in:
claincly 2023-09-20 06:09:20 -07:00 committed by Copybara-Service
parent 234f7525f0
commit 67900c3e81

View file

@ -88,12 +88,14 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
try {
videoSinkImpl =
new VideoSinkImpl(context, videoFrameProcessorFactory, renderControl, sourceFormat);
if (videoFrameMetadataListener != null) {
videoSinkImpl.setVideoFrameMetadataListener(videoFrameMetadataListener);
}
} catch (VideoFrameProcessingException e) {
throw new VideoSink.VideoSinkException(e, sourceFormat);
}
if (videoFrameMetadataListener != null) {
videoSinkImpl.setVideoFrameMetadataListener(videoFrameMetadataListener);
}
videoSinkImpl.setVideoEffects(checkNotNull(videoEffects));
}
/** Returns whether this provider is initialized for frame processing. */