[vlc-devel] Re: vlc: svn commit r20620 (pdherbemont)

Pierre d'Herbemont pdherbemont at free.fr
Tue Jun 19 19:20:47 CEST 2007


On 19 juin 07, at 14:57, Damien Fouilleul wrote:
>>
> the problem is that most of VLC internal objects already uses  
> refcouting, and not using this in libvlc either directly or  
> indirectly will cause trouble (and it is already causing with the  
> old/current libvlc)
>
> For example, when i ask to GET the playlist input object through  
> libvlc, i'm given a libvlc_input_t object, which contains a pointer  
> to the actual input_t object, unfortunately nothing stops the  
> playlist code from destroying the actual input_t object from under  
> me (basically on a STOP request, or end of playlsit, whatever),  
> leaving me with a useless libvlc_input_t object, which will  
> probably cause a crash the next time i use it. Using refcounting  
> should solve it, you could always increase the input_t refcounting  
> on a libvlc GET and decrease it on a RELEASE, possibly even adding  
> a RETAIN method as well

That's true.  We may crash because of the input_thread_t object. But  
we can retain this object from within the _new_from_input_thread, and  
release it from media_instance's release.

Anyway, you are very close to get me write this OO stuff. I am still  
a bit reluctant, and I really think that if we can get around it,  
that would be better.

Pierre.

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html



More information about the vlc-devel mailing list