From d620bedfdc6d48b28af1e83c94a02720ed7f70fd Mon Sep 17 00:00:00 2001 From: Francis Labelle Date: Mon, 4 Jan 2021 15:19:09 -0500 Subject: [PATCH] Copy image before drawing cursor. Fixes #271. --- pyrdp/player/Mp4EventHandler.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyrdp/player/Mp4EventHandler.py b/pyrdp/player/Mp4EventHandler.py index 1302e077e..a0d8dfce9 100644 --- a/pyrdp/player/Mp4EventHandler.py +++ b/pyrdp/player/Mp4EventHandler.py @@ -132,8 +132,7 @@ def onFinishRender(self): def _writeFrame(self, surface: QImage): w = self.stream.width h = self.stream.height - surface = surface.scaled(w, h) if self.scale else surface - frame = av.VideoFrame.from_image(ImageQt.fromqimage(surface)) + surface = surface.scaled(w, h) if self.scale else surface.copy() # Draw the mouse pointer. Render mouse clicks? p = QPainter(surface)