summaryrefslogtreecommitdiff
path: root/mpv.py
diff options
context:
space:
mode:
authorMarcel Moreaux <marcel@moreaux.nl>2021-07-19 11:04:31 +0200
committerjaseg <136313+jaseg@users.noreply.github.com>2021-07-28 12:37:55 +0200
commitb5f03dd2b7d55b9a632c8771be4ae1a05c2f7fb8 (patch)
treecddef98beb59dad862fdc172645114212b3963bf /mpv.py
parent03e847d8a1c83d0b29a96420095c31298c71cd45 (diff)
downloadpython-mpv-b5f03dd2b7d55b9a632c8771be4ae1a05c2f7fb8.tar.gz
python-mpv-b5f03dd2b7d55b9a632c8771be4ae1a05c2f7fb8.tar.bz2
python-mpv-b5f03dd2b7d55b9a632c8771be4ae1a05c2f7fb8.zip
Fix handling of c_void_p args in MpvRenderParam.__init__()
Handling of c_void_p args (x11_display, wl_display) was broken. Added a case to correctly handle the c_void_p constructor case. See https://github.com/jaseg/python-mpv/issues/169
Diffstat (limited to 'mpv.py')
-rw-r--r--mpv.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/mpv.py b/mpv.py
index fa2146e..a125d45 100644
--- a/mpv.py
+++ b/mpv.py
@@ -225,6 +225,9 @@ class MpvRenderParam(Structure):
elif cons is bool:
self.value = c_int(int(bool(value)))
self.data = cast(pointer(self.value), c_void_p)
+ elif cons is c_void_p:
+ self.value = value
+ self.data = cast(self.value, c_void_p)
else:
self.value = cons(**value)
self.data = cast(pointer(self.value), c_void_p)