]> git.sesse.net Git - vlc/blobdiff - modules/audio_output/directx.c
Fix xosd memleaks.
[vlc] / modules / audio_output / directx.c
index b3a1f48d4f3a815e7c9a1b87c9398ef03d10ed06..6c7228e7dc1ae657d98e1b8c5bdac2532146a685 100644 (file)
@@ -30,7 +30,7 @@
 # include "config.h"
 #endif
 
-#include <vlc/vlc.h>
+#include <vlc_common.h>
 #include <vlc_plugin.h>
 #include <vlc_aout.h>
 
@@ -226,7 +226,7 @@ static int  FillBuffer        ( aout_instance_t *, int, aout_buffer_t * );
     "audio output mode (which is not well supported by some soundcards)." )
 
 vlc_module_begin();
-    set_description( _("DirectX audio output") );
+    set_description( N_("DirectX audio output") );
     set_shortname( "DirectX" );
     set_capability( "audio output", 100 );
     set_category( CAT_AUDIO );
@@ -254,10 +254,7 @@ static int OpenAudio( vlc_object_t *p_this )
    /* Allocate structure */
     p_aout->output.p_sys = malloc( sizeof( aout_sys_t ) );
     if( p_aout->output.p_sys == NULL )
-    {
-        msg_Err( p_aout, "out of memory" );
         return VLC_ENOMEM;
-    }
 
     /* Initialize some variables */
     p_aout->output.p_sys->p_dsobject = NULL;
@@ -1067,7 +1064,7 @@ static void DirectSoundThread( notification_thread_t *p_notif )
     /* Wait here until Play() is called */
     WaitForSingleObject( p_notif->event, INFINITE );
 
-    if( !p_notif->b_die )
+    if( vlc_object_alive (p_notif) )
     {
         mwait( p_notif->start_date - AOUT_PTS_TOLERANCE / 2 );
 
@@ -1092,7 +1089,7 @@ static void DirectSoundThread( notification_thread_t *p_notif )
     }
     last_time = mdate();
 
-    while( !p_notif->b_die )
+    while( vlc_object_alive (p_notif) )
     {
         long l_read, l_free_slots;
         mtime_t mtime = mdate();