]> git.sesse.net Git - vlc/blobdiff - modules/video_output/snapshot.c
Partially cleanup the vout_window API
[vlc] / modules / video_output / snapshot.c
index 118e65a253f267fa22ba2c248eaddf4d0dd19109..09886bf089f278ec3caa9ed2d98835b6eb7f0c32 100644 (file)
@@ -276,7 +276,7 @@ static int Init( vout_thread_t *p_vout )
         p_snapshot->p_data = ( char* ) malloc( i_datasize );
         if( p_snapshot->p_data == NULL )
         {
-            free( p_snapshort );
+            free( p_snapshot );
             return VLC_ENOMEM;
         }
         p_vout->p_sys->p_list[i_index] = p_snapshot;
@@ -359,19 +359,11 @@ static void Destroy( vlc_object_t *p_this )
 /* Return the position in ms from the start of the movie */
 static mtime_t snapshot_GetMovietime( vout_thread_t *p_vout )
 {
-    input_thread_t* p_input;
-    vlc_value_t val;
-    mtime_t i_result;
-
-    p_input = p_vout->p_sys->p_input;
+    input_thread_t *p_input = p_vout->p_sys->p_input;
     if( !p_input )
         return 0;
 
-    var_Get( p_input, "time", &val );
-
-    i_result = val.i_time - p_input->i_pts_delay;
-
-    return( i_result / 1000 );
+    return var_GetTime( p_input, "time" ) / 1000;
 }
 
 /*****************************************************************************