mpv.py: update: Use ctypes.memmove to speed up
This commit is contained in:
parent
5e581e817b
commit
3105db35a4
1 changed files with 1 additions and 1 deletions
2
mpv.py
2
mpv.py
|
|
@ -744,7 +744,7 @@ class ImageOverlay:
|
|||
self._buf = create_string_buffer(w*h*4)
|
||||
self._size = img.size
|
||||
|
||||
self._buf[:] = out.tobytes('raw', 'BGRA')
|
||||
ctypes.memmove(self._buf, out.tobytes('raw', 'BGRA'), w*h*4)
|
||||
source = '&' + str(addressof(self._buf))
|
||||
|
||||
self.m.overlay_add(self.overlay_id, x, y, source, 0, 'bgra', w, h, stride)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue