vlc.insert_media(media, pos) randomly causes an access violation
OS: Windows 7 64 bits, also tried on the latest stable version of Ubuntu 64 bits. VLC version: 2.2.0, also tried on the latest nightly. Log :
1: video1.avi
2: video2.avi
3: video3.avi
4: video4.avi
5: video5.avi
6: video6.avi
Traceback (most recent call last):
File "test.py", line 15, in <module>
setup_player()
File "test.py", line 10, in setup_player
media_list.insert_media(vlc_instance.media_new(i), tmp)
File "E:\Documents\MeleeTV\vlc.py", line 1459, in media_new
m = libvlc_media_new_path(self, str_to_bytes(os.path.normpath(mrl)))
File "E:\Documents\MeleeTV\vlc.py", line 3938, in libvlc_media_new_path
return f(p_instance, path)
WindowsError: exception: access violation reading 0x4B4F6F66
setup_player() is the fonction where I create the playlist then try to play it. Unfortunately, it always crash before gathering all my videos. As you can see, insert_media() is the cause. Here is the python code of my test.py script:
import vlc, os
def setup_player():
vlc_instance = vlc.Instance()
media_list = vlc_instance.media_list_new()
tmp = 0
for i in os.listdir('Matches\\'):
tmp += 1
print str(tmp) + ': ' + i
media_list.insert_media(vlc_instance.media_new(i), tmp)
p = vlc_instance.media_list_player_new()
p.set_media_list(media_list)
p.play()
setup_player()
print(raw_input('test'))
Situation and reproducebility: The bug is always the same, it just sometimes doesn't occur at the same video. Sometimes it crashes earlier, sometimes later. Type of videos: I'm playing .avi videos.