X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fvideo_output%2Fsnapshot.c;h=a087268760f66bdc048decf06ae2b65ad4f33e7b;hb=c13a0a1dca2616c79edd269788d85212da0275e1;hp=b0242ac5edb2944bca475f9a26728f6b2fbcb218;hpb=f485214f09dd284cbb85674e937fbbb0a6032a2e;p=vlc diff --git a/modules/video_output/snapshot.c b/modules/video_output/snapshot.c index b0242ac5ed..a087268760 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,12 +38,15 @@ /***************************************************************************** * Preamble *****************************************************************************/ -#include + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif #include -#include -#include -#include +#include +#include +#include /***************************************************************************** * Local prototypes @@ -73,7 +76,7 @@ static void Display ( vout_thread_t *, picture_t * ); vlc_module_begin( ); set_description( _( "Snapshot module" ) ); - set_shortname( N_("Snapshot") ); + set_shortname( _("Snapshot") ); set_category( CAT_VIDEO ); set_subcategory( SUBCAT_VIDEO_VOUT ); @@ -324,13 +327,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 );