[vlc-commits] Fix ctypes.byref reference

Olivier Aubert git at videolan.org
Fri Jun 19 13:46:28 CEST 2015


vlc/python | branch: master | Olivier Aubert <contact at olivieraubert.net> | Fri Jun 19 13:43:34 2015 +0200| [1f9fb7d39d01272509eadf9f4b12f19fb4447800] | committer: Olivier Aubert

Fix ctypes.byref reference

> http://git.videolan.org/gitweb.cgi/vlc/python.git/?a=commit;h=1f9fb7d39d01272509eadf9f4b12f19fb4447800
---

 override.py |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/override.py b/override.py
index 9db36ee..3cab535 100644
--- a/override.py
+++ b/override.py
@@ -164,8 +164,8 @@ class Media:
         @version: LibVLC 2.1.0 and later.
         """
         mediaTrack_pp = ctypes.POINTER(MediaTrack)()
-        n = libvlc_media_tracks_get(self, byref(mediaTrack_pp))
-        info = cast(ctypes.mediaTrack_pp, ctypes.POINTER(ctypes.POINTER(MediaTrack) * n))
+        n = libvlc_media_tracks_get(self, ctypes.byref(mediaTrack_pp))
+        info = ctypes.cast(ctypes.mediaTrack_pp, ctypes.POINTER(ctypes.POINTER(MediaTrack) * n))
         return info
 
 class MediaList:



More information about the vlc-commits mailing list