Use the crop rect from the pl_frame instead of the raw AVFrame dimensions
This commit is contained in:
parent
0223394725
commit
4e7107a09e
1 changed files with 4 additions and 4 deletions
|
|
@ -716,10 +716,10 @@ void PlVkRenderer::renderFrame(AVFrame *frame)
|
||||||
SDL_AtomicUnlock(&m_OverlayLock);
|
SDL_AtomicUnlock(&m_OverlayLock);
|
||||||
|
|
||||||
SDL_Rect src;
|
SDL_Rect src;
|
||||||
src.x = 0;
|
src.x = mappedFrame.crop.x0;
|
||||||
src.y = 0;
|
src.y = mappedFrame.crop.y0;
|
||||||
src.w = frame->width;
|
src.w = mappedFrame.crop.x1 - mappedFrame.crop.x0;
|
||||||
src.h = frame->height;
|
src.h = mappedFrame.crop.y1 - mappedFrame.crop.y0;
|
||||||
|
|
||||||
SDL_Rect dst;
|
SDL_Rect dst;
|
||||||
dst.x = targetFrame.crop.x0;
|
dst.x = targetFrame.crop.x0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue