Closed pgolinski closed 6 years ago
I'm experiencing a similar thing with local files played using VLC in C#. What I'm doing is creating a series of vlc controls that get placed on a panel in a media sequencer. It then swaps the controls out and plays each one. I then try to dispose all the controls by first removing them from the Controls collection, then running the Dispose method. It ONLY freezes on the most recently played control. What I'm about to try is to create a local video file that is one second long and is blank, switching to it after the media sequence is done (leaving it basically a static control that always gets called and played) then disposing all the controls in the media sequencer, creating the new one, etc. See if that lets me dispose all the controls and clears the memory to boot.
And... it's causing other problems now... or my logic is... not sure... either way, I can't get an accurate read on whether or not memory is being freed.
Several issues reported freezes when disposing. We need to reproduce this issue and see what's wrong. If you want to dig into the code and see what's wrong at disposal, that would really help me. Thanks
I suspect that your issue is caused by this : https://github.com/ZeBobo5/Vlc.DotNet/wiki/Vlc.DotNet-freezes-(don't-call-Vlc.DotNet-from-a-Vlc.DotNet-callback)
Please reopen if you still have an issue.
That sounds very likely the cause. Time was a factor, though, so I dumped everything and rewrote the app as a WPF using the native video panel.
When RTSP stream was ended (by timeout for example) and EndReached event was raised, it is impossible to restore streaming by calling Play method. The application will freeze if you try. Disposing whole object for recreation also causes freeze. Leaving VlcControl without dispose and creating new object couses memory leaks.
In other words: when RTSP stream is interrupted there is no way to get it back without restarting the application. It's not right. I assume it's a bug.
PS. Using Vlc ActiveX control I can achieve that with no problem.