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
This commit is contained in:
parent
03e847d8a1
commit
b5f03dd2b7
1 changed files with 3 additions and 0 deletions
3
mpv.py
3
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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue