]> git.sesse.net Git - vlc/blobdiff - modules/audio_output/hd1000a.cpp
alsa: fix a memory leak.
[vlc] / modules / audio_output / hd1000a.cpp
index a317cdf4cbeb5a9deb62b5ad9967d565a1353f53..29481707c72ed01bf51b26ad13ce0d51c96d39ce 100644 (file)
@@ -26,8 +26,6 @@
  *****************************************************************************/
 extern "C"
 {
-#include <errno.h>
-
 #ifdef HAVE_CONFIG_H
 # include "config.h"
 #endif
@@ -156,7 +154,7 @@ static int Open( vlc_object_t * p_this )
         }
     }
 
-    p_aout->output.output.i_format = AOUT_FMT_S16_NE;
+    p_aout->output.output.i_format = VLC_CODEC_S16N;
     p_aout->output.i_nb_samples = FRAME_SIZE;
     p_aout->output.output.i_physical_channels
             = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT;
@@ -168,14 +166,14 @@ static int Open( vlc_object_t * p_this )
 
     /* Create thread and wait for its readiness. */
     if( vlc_thread_create( p_aout, "aout", Thread,
-                           VLC_THREAD_PRIORITY_OUTPUT, false ) )
+                           VLC_THREAD_PRIORITY_OUTPUT ) )
     {
         msg_Err( p_aout, "cannot create OSS thread (%m)" );
         pPlayer->Close();
         delete pPlayer;
         free( p_sys->ppBuffers );
         free( p_sys );
-        return VLC_ETHREAD;
+        return VLC_ENOMEM;
     }
 
     return VLC_SUCCESS;