[vlc-devel] VLC deadlock at libvlc_media_player_stop(Even in latest release 1.1.0)
Hugo Beauzee-Luyssen
beauze.h at gmail.com
Wed Jul 14 14:05:16 CEST 2010
On Wed, Jul 14, 2010 at 1:58 PM, Parveen Jain <parveenjain at live.com> wrote:
> I am running this in Linux.
> code for play and stop media is as:
> Here I am creating inst only once in this function.
> createLibVLCInst()
> {
> const char * const vlc_args[] = {
> "-I", "dummy", /* Don't use any interface */
> "--ignore-config" /* Don't use VLC's config */
> };
> // libvlc_exception_init (&ex);
> inst = libvlc_new (sizeof(vlc_args) / sizeof(vlc_args[0]), vlc_args);
> }
> int PlayVideo(fileToPlay,char *ipAddr,int videoRtpPort,int videoRtcpPort,int
> audioRtpPort,int audioRtcpPort,void *userData)
> {
>
> char vlcOption[500];
> memset(vlcOption,0,500);
> DP_LOG(TRACE_DEBUG,DP_INFO,"[videoStream::PlayVideo]->Entering");
> //const char * file ="h263_alaw.mov";
> libvlc_instance_t * inst = sSipVideoMgr.getInstance();
>
> m = libvlc_media_new_path (inst, fileToPlay.c_str());
> mp = libvlc_media_player_new_from_media (m);
> // Create an event manager for the player for handling e.g. time change
> events
> m_pEvtManager=libvlc_media_player_event_manager(mp);
> SetEventHandler(handleVideoEventsCB,userData);
> sprintf(vlcOption,"sout=#transcode{acodec=alaw,channels=1,samplerate=8000}:rtp{dst=%s,port-audio=%d,port-video=%d}",ipAddr,audioRtpPort,videoRtpPort);
> libvlc_media_add_option(m,vlcOption);
> libvlc_media_release (m);
> libvlc_media_player_play (mp);
> DP_LOG(TRACE_DEBUG,DP_INFO,"[videoStream::PlayVideo]->Exiting");
> return 0; // only to prevent compiler warning
> }
> int videoStream::stopVideo()
> {
> /* Stop playing */
> libvlc_media_player_stop (mp);
> /* Free the media_player */
> libvlc_media_player_release (mp);
> }
> Running this flow for almost 30 "H263 video" calls per second; and It
> freezes after every 3-4 hours of testing.
> Let me know if you need any more info for reproducing it.
> Regards,
> Parveen Jain
>> To: vlc-devel at videolan.org
>> Date: Wed, 14 Jul 2010 12:54:42 +0200
>> From: remi at remlab.net
>> Subject: Re: [vlc-devel] VLC deadlock at libvlc_media_player_stop(Even in
>> latest release 1.1.0)
>>
>>
>> On Wed, 14 Jul 2010 16:20:02 +0530, Parveen Jain <parveenjain at live.com>
>> wrote:
>> >
>> > Hi All, I had created an video application(using libVLC) which streams
>> > video files.But somehow after 3-4 hours of testing the application
>> > freezes.The application always gets deadlocked at
>> "libvlc_media_player_stop
>> > (mp)".
>> > I read in several of the threads that issue is resolved in latest
>> releases
>> > ,and I installed even the latest VLC_1.1.0(installed today only), but
>> > the
>> > issue is still there.Are we able to fix it on any other way ?Or someone
>> can
>> > provide any way out for this ?
>>
>> Can you provide some simple C code test case?
>> Can you provide a threads stack trace of the deadlock?
>> Is it Windows-specific?
>>
I'd say your sample lacks the call to videoStream::stopVideo()
--
Hugo Beauzée-Luyssen
More information about the vlc-devel
mailing list