]> git.sesse.net Git - vlc/blobdiff - modules/video_output/snapshot.c
ncurses: use directory:// URI when adding a directory to playlist
[vlc] / modules / video_output / snapshot.c
index 8bfbfb7d1a137cc98a7355e1245565059928bae0..9c2c63fb93107f35b9ec8133e0982c0021fdfa57 100644 (file)
  *****************************************************************************/
 
 /*****************************************************************************
- * 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,6 @@
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include <stdlib.h>
 
 #include <vlc/vlc.h>
 #include <vlc_vout.h>
@@ -324,13 +323,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 );