python-vlc
python-vlc copied to clipboard
video_get_title_description causes segfault
3.0.102 from pip works, the next version 3.0.4105 and later causes a segfault when iterating through the returned result from video_get_title_description.
See the code at https://bin.snyman.info/mmmcr54t 3.0.102 gives me the following output: https://bin.snyman.info/mmm4mxpy wit 3.0.4105 gives me the following output: https://bin.snyman.info/mmm95ycu
FWIW,
Below is the output of that script on macOS with both Python 2.7.16 and 3.7.3, vlc.py 3.0.6109 and libvlc 3.0.6 Vetinari. Looks like the root cause may a NULL pointer, perhaps due to the missing dvd://dev/sr0. Regardless, a NULL pointer shouldn't crash vlc.py.
% python issue85.py
libdvdnav: Using dvdnav version 6.0.0
libdvdread: Can't stat /dev/dvd
No such file or directory
libdvdread: Could not open /dev/dvd
libdvdnav: vm: failed to open/read the DVD
libdvdread: Can't stat /dev/dvd
No such file or directory
libdvdread: Could not open /dev/dvd
[00007ffd297d4870] dvdread demux error: DVDRead cannot open source: /dev/dvd
[00007ffd297d4870] main demux error: Playback failure
[00007ffd297d4870] main demux error: DVDRead could not open the disc "/dev/dvd".
[00007ffd2b028ef0] main input error: Your input can't be opened
[00007ffd2b028ef0] main input error: VLC is unable to open the MRL 'dvd://dev/sr0'. Check the log for details.
Traceback (most recent call last):
File "issue85.py", line 15, in <module>
for title in titles:
ValueError: NULL pointer access
% python vlc.py -v
vlc.py: 3.0.6109 (Sun Mar 31 20:14:16 2019 3.0.6)
LibVLC version: 3.0.6 Vetinari (0x3000600)
LibVLC compiler: clang: warning: argument unused during compilation: '-mmacosx-version-min=10.7' [-Wunused-command-line-argument]
Plugin path: /Applications/VLC3.0.6.app/Contents/MacOS/plugins
Python: 2.7.16 (64bit) macOS 10.13.6