Hello
I am writing a program in vb.net
In my program I need to do that videos in a certain folder will appear one after the other.
In order to do that i am using vlc version 1.1.1.1 with vlcControl object
, everything work fine but after some hours the program is stuck-it is not responding
The line where it is stuck is :
MoviOfSlidePicMovi1.Media = VlcMedia
In order to solve it I tried to release the memory via these Sentences:
Public MoviOfSlidePicMovi1 As VlcControl
Public VlcMedia As Vlc.DotNet.Core.Medias.PathMedia
If (MoviOfSlidePicMovi0.Media IsNot Nothing) Then
MoviOfSlidePicMovi0.Media.Dispose()
MoviOfSlidePicMovi0.Media = Nothing
End If
If (VlcMedia IsNot Nothing) Then
VlcMedia.Dispose()
VlcMedia = Nothing
End If
VlcMedia = New Vlc.DotNet.Core.Medias.PathMedia(str)
MoviOfSlidePicMovi0.Media = VlcMedia
when it didn't worked, I tried the same sentences without the dispose sentence:
Public MoviOfSlidePicMovi1 As VlcControl
Public VlcMedia As Vlc.DotNet.Core.Medias.PathMedia
If (MoviOfSlidePicMovi0.Media IsNot Nothing) Then
MoviOfSlidePicMovi0.Media = Nothing
End If
If (VlcMedia IsNot Nothing) Then
VlcMedia = Nothing
End If
VlcMedia = New Vlc.DotNet.Core.Medias.PathMedia(str)
MoviOfSlidePicMovi0.Media = VlcMedia
the program worked better ,but still after few hours it was stuck
NOTE:
I am using the same object to show all the videos-it mean I am using one vlc player ,I open one video and when I want to replace it I am changing just the media property
How can I make it work without causing the program to be stuck after some time ???
Please help me it very urgent to me
thanks a lot
What I have tried:
I tried to release the memory- in the way that I wrote in the body of the question
but it didn't solve my problem