From 4e7107a09ed3ad5e245f883f027cf7ef348c4018 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 17 Dec 2023 19:06:56 -0600 Subject: [PATCH] Use the crop rect from the pl_frame instead of the raw AVFrame dimensions --- app/streaming/video/ffmpeg-renderers/plvk.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/streaming/video/ffmpeg-renderers/plvk.cpp b/app/streaming/video/ffmpeg-renderers/plvk.cpp index 29eeadfa..44c5bf90 100644 --- a/app/streaming/video/ffmpeg-renderers/plvk.cpp +++ b/app/streaming/video/ffmpeg-renderers/plvk.cpp @@ -716,10 +716,10 @@ void PlVkRenderer::renderFrame(AVFrame *frame) SDL_AtomicUnlock(&m_OverlayLock); SDL_Rect src; - src.x = 0; - src.y = 0; - src.w = frame->width; - src.h = frame->height; + src.x = mappedFrame.crop.x0; + src.y = mappedFrame.crop.y0; + src.w = mappedFrame.crop.x1 - mappedFrame.crop.x0; + src.h = mappedFrame.crop.y1 - mappedFrame.crop.y0; SDL_Rect dst; dst.x = targetFrame.crop.x0;