libvlc: callbacks still received after player stop/release

This forum is about all development around libVLC.
badgeror
Blank Cone
Blank Cone
Posts: 22
Joined: 15 Oct 2014 15:31
Operating System: Windows
Location: Sophia-Antipolis - FRANCE

libvlc: callbacks still received after player stop/release

Postby badgeror » 15 Oct 2014 15:44

Hi all
I'm having strange problems with a RTSP stream decoder that I'm building based on libvlc.
It uses callbacks (registered with libvlc_video_set_callbacks) to receive images and provide them to the application. This works fine thanks for the work guys btw.

The issue comes when deleting the decoder. I'm calling the following sequence
libvlc_media_player_stop(m_player);
libvlc_media_player_release(m_player); m_player = NULL;
libvlc_media_release(m_media); m_media = NULL;
followed by:
libvlc_release(sm_vlcInstance);

All works fine yet I'm still receiving calls to the callback methods after these calls. How is that possible? I'd expect player_stop to stop messaging and not receive any more callbacks calls afterwards. Am I'm missing something or is there some message buffering done in libvlc which is not cleared at stop?

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: libvlc: callbacks still received after player stop/relea

Postby Rémi Denis-Courmont » 15 Oct 2014 15:49

Normally, it can still occur during stop, but not after stop has returned.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

badgeror
Blank Cone
Blank Cone
Posts: 22
Joined: 15 Oct 2014 15:31
Operating System: Windows
Location: Sophia-Antipolis - FRANCE

Re: libvlc: callbacks still received after player stop/relea

Postby badgeror » 15 Oct 2014 16:09

Well that's the behavior I expected but even after libvlc_release I'm still getting some which cause my app to crash as the object used in the callbacks has been destroyed... I'm running with VLC 2.1.5 on a windows 8.1 64. code is compiled as 32 bits exe with VS2010

badgeror
Blank Cone
Blank Cone
Posts: 22
Joined: 15 Oct 2014 15:31
Operating System: Windows
Location: Sophia-Antipolis - FRANCE

Re: libvlc: callbacks still received after player stop/relea

Postby badgeror » 20 Oct 2014 14:47

Ok I just found out the source of the issue:
I was opening the stream twice (second time through a non trivial code path) but kept track of the last opening only so I stopped only one of the streams...
Next time I should check my code first


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 9 guests