[vlc-devel] commit: Added ChromaCreate/Destroy (cosmetic) (Laurent Aimar )
Pierre d'Herbemont
pdherbemont at free.fr
Mon Jun 30 12:34:48 CEST 2008
Quoting git version control <git at videolan.org>:
> vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun Jun 29
> 20:59:01 2008 +0000| [71c1ddb6aa1c9715d1096b3bbee3e7f0abcc7f07]
>
> Added ChromaCreate/Destroy (cosmetic)
>
> +static void ChromaDestroy( vout_thread_t *p_vout )
> +{
> + assert( !p_vout->b_direct && p_vout->p_chroma );
> +
> + module_Unneed( p_vout->p_chroma, p_vout->p_chroma->p_module );
> + vlc_object_release( p_vout->p_chroma );
> + p_vout->p_chroma = NULL;
> +}
Given that chroma are refcounted, it is probably not a good idea to do the
destructor that way. I think that you'd better use vlc_object_set_destructor().
Else you might end up in using a destructed chroma->p_module.
Pierre.
More information about the vlc-devel
mailing list