TakeSourceScreenshot: fix tearing issue when scaling

This commit is contained in:
Stéphane L 2019-05-03 01:11:36 +02:00
parent 059244bb32
commit c92477b457

View File

@ -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;