Page 1 of 1

libvlc_release: can we know when refcounter reaches 0

Posted: 20 Oct 2014 14:53
by badgeror
Hi,

Ok here's my problem:
- I'm doing multiple streams in a multi-threaded software. No problem.
- I'm creating a libvlc_instance on first connection then retaining each time a new connection comes in. Still no problem.
- When stopping one of the streams I make a call to libvlc_release. still no problem

Now when stopping the last stream libvlc_release will destroy the libvl_instance_t* that was first created. That's all fine and dandy unless I want to open a new connection as my instance has not been set to NULL and using it as argument of libvlc_maintain will crash as the instance has been released...

So is there a way to get the result of the libvlc_release operation (i.e. can we know if instance has been deleted or its ref counter simply decremented)?

Thanks for any help on this one...

Re: libvlc_release: can we know when refcounter reaches 0

Posted: 20 Oct 2014 15:22
by RĂ©mi Denis-Courmont
No.

Re: libvlc_release: can we know when refcounter reaches 0

Posted: 20 Oct 2014 15:33
by badgeror
Ok seems good to me, I'll just stop retaining and release instance at program exit...