X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fvideo_output%2Fsnapshot.c;h=c13a4ef928dd84e102237b65fa2dfe57fa9ea12f;hb=b6cdf137040a4c01b2340eb921a3509c4133a930;hp=8bfbfb7d1a137cc98a7355e1245565059928bae0;hpb=24977cae04bfbff8d685dfb6cc7e660afcfd71c3;p=vlc diff --git a/modules/video_output/snapshot.c b/modules/video_output/snapshot.c index 8bfbfb7d1a..c13a4ef928 100644 --- a/modules/video_output/snapshot.c +++ b/modules/video_output/snapshot.c @@ -22,12 +22,12 @@ *****************************************************************************/ /***************************************************************************** - * This module is a pseudo video output the offers the possibility to + * This module is a pseudo video output that offers the possibility to * keep a cache of low-res snapshots. * The snapshot structure is defined in include/snapshot.h * In order to access the current snapshot cache, object variables are used: * snapshot-list-pointer : the pointer on the first element in the list - * snapshot-datasize : size of a snapshot + * snapshot-datasize : size of a snapshot * (also available in snapshot_t->i_datasize) * snapshot-cache-size : size of the cache list * @@ -38,7 +38,10 @@ /***************************************************************************** * Preamble *****************************************************************************/ -#include + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif #include #include @@ -52,6 +55,7 @@ static int Create ( vlc_object_t * ); static void Destroy ( vlc_object_t * ); static int Init ( vout_thread_t * ); +static void End ( vout_thread_t * ); static void Display ( vout_thread_t *, picture_t * ); /***************************************************************************** @@ -120,7 +124,7 @@ static int Create( vlc_object_t *p_this ) var_Create( p_vout, "snapshot-list-pointer", VLC_VAR_ADDRESS ); p_vout->pf_init = Init; - p_vout->pf_end = NULL; + p_vout->pf_end = End; p_vout->pf_manage = NULL; p_vout->pf_render = NULL; p_vout->pf_display = Display; @@ -314,6 +318,14 @@ static int Init( vout_thread_t *p_vout ) return VLC_SUCCESS; } +/***************************************************************************** + * End: terminate video thread output method + *****************************************************************************/ +static void End( vout_thread_t *p_vout ) +{ + (void)p_vout; +} + /***************************************************************************** * Destroy: destroy video thread ***************************************************************************** @@ -324,13 +336,13 @@ static void Destroy( vlc_object_t *p_this ) vout_thread_t *p_vout = ( vout_thread_t * )p_this; int i_index; + var_Destroy( p_vout->p_sys->p_input, "snapshot-id" ); + vlc_object_release( p_vout->p_sys->p_input ); var_Destroy( p_this, "snapshot-width" ); var_Destroy( p_this, "snapshot-height" ); var_Destroy( p_this, "snapshot-datasize" ); - var_Destroy( p_this->p_libvlc_global, "snapshot-id" ); - for( i_index = 0 ; i_index < p_vout->p_sys->i_size ; i_index++ ) { free( p_vout->p_sys->p_list[ i_index ]->p_data );