From bd8e4a4bcecc51c707441b5a3c65abc717e50cef Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Wed, 18 Jul 2018 21:48:46 -0700 Subject: [PATCH] Fix DXVA video centering --- app/streaming/video/ffmpeg-renderers/dxva2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/streaming/video/ffmpeg-renderers/dxva2.cpp b/app/streaming/video/ffmpeg-renderers/dxva2.cpp index 1da83e03..ebb21c4d 100644 --- a/app/streaming/video/ffmpeg-renderers/dxva2.cpp +++ b/app/streaming/video/ffmpeg-renderers/dxva2.cpp @@ -450,7 +450,7 @@ void DXVA2Renderer::renderFrame(AVFrame* frame) int drawWidth = (int)(m_DisplayHeight * srcAspectRatio); sample.DstRect.bottom = m_DisplayHeight; sample.DstRect.left = (m_DisplayWidth - drawWidth) / 2; - sample.DstRect.right = drawWidth; + sample.DstRect.right = sample.DstRect.left + drawWidth; } DXVA2_VideoProcessBltParams bltParams = {};