]> git.sesse.net Git - vlc/blobdiff - modules/visualization/goom.c
Adds headers back.
[vlc] / modules / visualization / goom.c
index 3d7070c906cf5f8fb2931b726b8a9f704e2326d3..d21d199e540512491d35078a4c1fc8b6eb089816 100644 (file)
@@ -25,8 +25,6 @@
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include <stdlib.h>                                      /* malloc(), free() */
-#include <string.h>                                              /* strdup() */
 #include <errno.h>
 
 #include <vlc/vlc.h>
@@ -131,7 +129,8 @@ static int Open( vlc_object_t *p_this )
     aout_filter_sys_t *p_sys;
     goom_thread_t     *p_thread;
     vlc_value_t       width, height;
-    video_format_t    fmt = {0};
+    video_format_t    fmt;
+
 
     if ( p_filter->input.i_format != VLC_FOURCC('f','l','3','2' )
          || p_filter->output.i_format != VLC_FOURCC('f','l','3','2') )
@@ -161,6 +160,8 @@ static int Open( vlc_object_t *p_this )
     var_Create( p_thread, "goom-height", VLC_VAR_INTEGER|VLC_VAR_DOINHERIT );
     var_Get( p_thread, "goom-height", &height );
 
+    memset( &fmt, 0, sizeof(video_format_t) );
+
     fmt.i_width = fmt.i_visible_width = width.i_int;
     fmt.i_height = fmt.i_visible_height = height.i_int;
     fmt.i_chroma = VLC_FOURCC('R','V','3','2');
@@ -381,7 +382,7 @@ static void Close( vlc_object_t *p_this )
     aout_filter_sys_t *p_sys = p_filter->p_sys;
 
     /* Stop Goom Thread */
-    p_sys->p_thread->b_die = VLC_TRUE;
+    vlc_object_kill( p_sys->p_thread );
 
     vlc_mutex_lock( &p_sys->p_thread->lock );
     vlc_cond_signal( &p_sys->p_thread->wait );
@@ -413,13 +414,10 @@ static char *TitleGet( vlc_object_t *p_this )
 
     if( p_input )
     {
-        if( input_GetItem(p_input)->p_meta->psz_title &&
-                *input_GetItem(p_input)->p_meta->psz_title )
-        {
-            psz_title = strdup( input_GetItem(p_input)->p_meta->psz_title );
-        }
-        else
+        psz_title = strdup( input_item_GetTitle( input_GetItem( p_input ) ) );
+        if( EMPTY_STR( psz_title ) )
         {
+            free( psz_title );
             char *psz = strrchr( input_GetItem(p_input)->psz_uri, '/' );
 
             if( psz )