Opening a video in a HTTP link with a SRT file crashes VLC
Steps to reproduce:
- copy any video file to a HTTP server
- copy or create a SRT file with the same name
- go to vlc, open network stream, input the url and check "scan for subtitles"
- open the same file twice
Here's a very small mp4 file for testing: http://techslides.com/demos/sample-videos/small.mp4
And here's a very small srt for testing: https://github.com/andreyvit/subtitle-tools/blob/master/sample.srt
You'll need to put this test in an http server, it doesn't crash if the file is local.
This actually triggers the bug described here VLCKit#116 (closed)
I don't know how to fix this, but I know that it happens when doing dealloc on VLCMedia object, which happens because mediaList will get dealloc'ed, which in turn happens because we created a new VLCLibrary when doing the initWithOptions (because using the sharedLibrary this is not triggered, which is the default in almost all code paths!).