]> git.sesse.net Git - vlc/blobdiff - modules/codec/ffmpeg/audio.c
* all: I have added two new variables in es_descriptor_t and
[vlc] / modules / codec / ffmpeg / audio.c
index 26e4cc9aeac69320d4d161288a938ee3ca62d7a2..55cd530bca99f56ed8b88077fb216fcd99636d89 100644 (file)
@@ -2,7 +2,7 @@
  * audio.c: audio decoder using ffmpeg library
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: audio.c,v 1.5 2002/11/28 16:32:29 fenrir Exp $
+ * $Id: audio.c,v 1.11 2003/01/07 21:49:01 fenrir Exp $
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *
@@ -43,6 +43,7 @@
 #   include <sys/times.h>
 #endif
 #include "codecs.h"
+#include "aout_internal.h"
 
 #include "avcodec.h"                                            /* ffmpeg */
 
@@ -57,7 +58,7 @@ int      E_( InitThread_Audio )   ( adec_thread_t * );
 void     E_( EndThread_Audio )    ( adec_thread_t * );
 void     E_( DecodeThread_Audio ) ( adec_thread_t * );
 
-static int pi_channels_maps[6] =
+static unsigned int pi_channels_maps[6] =
 {
     0,
     AOUT_CHAN_CENTER,   AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT,
@@ -115,10 +116,12 @@ static void ffmpeg_GetWaveFormatEx( waveformatex_t *p_wh,
  *****************************************************************************/
 int E_( InitThread_Audio )( adec_thread_t *p_adec )
 {
-    if( p_adec->p_fifo->p_demux_data )
+    WAVEFORMATEX *p_wf;
+
+    if( ( p_wf = p_adec->p_fifo->p_waveformatex ) != NULL )
     {
-        ffmpeg_GetWaveFormatEx( &p_adec->format, 
-                                (u8*)p_adec->p_fifo->p_demux_data );
+        ffmpeg_GetWaveFormatEx( &p_adec->format,
+                                (uint8_t*)p_wf );
     }
     else
     {
@@ -237,7 +240,7 @@ void  E_( DecodeThread_Audio )( adec_thread_t *p_adec )
         p_adec->p_context->channels > 5 )
     {
         msg_Warn( p_adec->p_fifo,
-                  "invalid channels count", 
+                  "invalid channels count %d",
                   p_adec->p_context->channels );
     }