]> git.sesse.net Git - vlc/blobdiff - modules/visualization/goom.c
Fixed locking scheme.
[vlc] / modules / visualization / goom.c
index 1e870f7663f1d37c286d25212d0b412438fba7e8..0fb03910fc0453b8072473a4f26c972cee7698ff 100644 (file)
@@ -31,7 +31,7 @@
 # include "config.h"
 #endif
 
-#include <vlc/vlc.h>
+#include <vlc_common.h>
 #include <vlc_plugin.h>
 #include <vlc_aout.h>
 #include <vlc_vout.h>
@@ -70,8 +70,8 @@ static void Close        ( vlc_object_t * );
 #define MAX_SPEED 10
 
 vlc_module_begin();
-    set_shortname( _("Goom"));
-    set_description( _("Goom effect") );
+    set_shortname( N_("Goom"));
+    set_description( N_("Goom effect") );
     set_category( CAT_AUDIO );
     set_subcategory( SUBCAT_AUDIO_VISUAL );
     set_capability( "visualization", 0 );
@@ -196,7 +196,7 @@ static int Open( vlc_object_t *p_this )
                            VLC_THREAD_PRIORITY_LOW, false ) )
     {
         msg_Err( p_filter, "cannot lauch goom thread" );
-        vout_Destroy( p_thread->p_vout );
+        vlc_object_release( p_thread->p_vout );
         vlc_mutex_destroy( &p_thread->lock );
         vlc_cond_destroy( &p_thread->wait );
         free( p_thread->psz_title );
@@ -336,7 +336,7 @@ static void Thread( vlc_object_t *p_this )
 
     p_plugin_info = goom_init( width.i_int, height.i_int );
 
-    while( !p_thread->b_die )
+    while( vlc_object_alive (p_thread) )
     {
         uint32_t  *plane;
         picture_t *p_pic;
@@ -361,7 +361,7 @@ static void Thread( vlc_object_t *p_this )
         p_thread->psz_title = NULL;
 
         while( !( p_pic = vout_CreatePicture( p_thread->p_vout, 0, 0, 0 ) ) &&
-               !p_thread->b_die )
+               vlc_object_alive (p_thread) )
         {
             msleep( VOUT_OUTMEM_SLEEP );
         }