LibVLC player regression from v4
There is a regression in the behavior of the player introduced in the master branch.
I'm not sure which commit introduced the regression (at least as far back as 4.0.0-dev-12793-g41bb65aeb2
exhibits the issue).
The 3.x branch does not have this problem.
Minimal repro code:
class Program
{
static void Main(string[] args)
{
Core.Initialize();
using var libVLC = new LibVLC();
using var media = new Media(libVLC, new Uri(@"C:\Users\Martin\Videos\IMG_4101.mov"));
using var mp = new MediaPlayer(libVLC);
mp.Media = media;
mp.Media = media;
mp.Play();
Console.ReadKey();
}
}
Expected behavior:
The video plays once.
Actual behavior:
The video plays twice.
Possible explanation/solution
It appears that calls to libvlc_media_player_set_media
queue up input threads which kick off once the intended playback has finished.
Originally reported at vlc-unity#125 (closed)