]> git.sesse.net Git - vlc/blobdiff - include/aout_internal.h
Re-enable random.
[vlc] / include / aout_internal.h
index e8e611266a9334441e9975b5dc36e11f132f2dc9..a7f7c4b285bf795116f8441d48288c1ac2d9c368 100644 (file)
@@ -34,6 +34,10 @@ typedef struct aout_alloc_t
 #define AOUT_ALLOC_STACK    1
 #define AOUT_ALLOC_HEAP     2
 
+#if defined( __APPLE__ ) || defined( SYS_BSD )
+#undef HAVE_ALLOCA
+#endif
+
 #ifdef HAVE_ALLOCA
 #   define ALLOCA_TEST( p_alloc, p_new_buffer )                             \
         if ( (p_alloc)->i_alloc_type == AOUT_ALLOC_STACK )                  \
@@ -81,10 +85,11 @@ typedef struct aout_alloc_t
     }
 
 #define aout_BufferFree( p_buffer )                                         \
-    if ( (p_buffer)->i_alloc_type == AOUT_ALLOC_HEAP )                      \
+    if( p_buffer != NULL && (p_buffer)->i_alloc_type == AOUT_ALLOC_HEAP )   \
     {                                                                       \
         free( p_buffer );                                                   \
-    }
+    }                                                                       \
+    p_buffer = NULL;
 
 /*****************************************************************************
  * aout_fifo_t : audio output buffer FIFO
@@ -150,6 +155,9 @@ struct aout_input_t
      * third-party. */
     vlc_mutex_t             lock;
 
+    /* The input thread that spawned this input */
+    input_thread_t         *p_input_thread;
+
     audio_sample_format_t   input;
     aout_alloc_t            input_alloc;