]> git.sesse.net Git - vlc/blobdiff - include/aout_internal.h
Non-working general declarations for disc probing (Refs:#565)
[vlc] / include / aout_internal.h
index 1d574ebb50cc1fc8b75452f3139073424434fdf8..a7f7c4b285bf795116f8441d48288c1ac2d9c368 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * aout_internal.h : internal defines for audio output
  *****************************************************************************
- * Copyright (C) 2002 VideoLAN (Centrale Réseaux) and its contributors
+ * Copyright (C) 2002 the VideoLAN team
  * $Id$
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
@@ -18,7 +18,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 /*****************************************************************************
@@ -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;