From c92477b45765e1d24794d84825b09305326300cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20L?= Date: Fri, 3 May 2019 01:11:36 +0200 Subject: [PATCH] TakeSourceScreenshot: fix tearing issue when scaling --- src/WSRequestHandler_Sources.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WSRequestHandler_Sources.cpp b/src/WSRequestHandler_Sources.cpp index 0726a87d..9a05faa3 100644 --- a/src/WSRequestHandler_Sources.cpp +++ b/src/WSRequestHandler_Sources.cpp @@ -1430,7 +1430,7 @@ HandlerResponse WSRequestHandler::HandleTakeSourceScreenshot(WSRequestHandler* r if (gs_stagesurface_map(stagesurface, &videoData, &videoLinesize)) { int linesize = sourceImage.bytesPerLine(); for (int y = 0; y < imgHeight; y++) { - memcpy(sourceImage.scanLine(y), videoData + (y * linesize), linesize); + memcpy(sourceImage.scanLine(y), videoData + (y * videoLinesize), linesize); } gs_stagesurface_unmap(stagesurface); renderSuccess = true;