]> git.sesse.net Git - vlc/commitdiff
* modules/codec/*: reverted my previous patch that explicitly set
authorGildas Bazin <gbazin@videolan.org>
Thu, 2 Jan 2003 20:48:28 +0000 (20:48 +0000)
committerGildas Bazin <gbazin@videolan.org>
Thu, 2 Jan 2003 20:48:28 +0000 (20:48 +0000)
i_bytes_per_frame and i_frame_length in each audio decoder.
* src/audio_output/dec.c: proper fix to correctly set i_bytes_per_frame
and i_frame_length.

modules/codec/adpcm.c
modules/codec/araw.c
modules/codec/faad/decoder.c
modules/codec/ffmpeg/audio.c
modules/codec/lpcm.c
modules/codec/mad/libmad.c
modules/codec/mpeg_audio/decoder.c
modules/codec/vorbis.c
src/audio_output/dec.c

index 80ee5d76baaac2bb853190f6a8bafca44ee8b928..78cf7fbc93f8d2851052a264f2b03f0f94015bc7 100644 (file)
@@ -2,7 +2,7 @@
  * adpcm.c : adpcm variant audio decoder
  *****************************************************************************
  * Copyright (C) 2001, 2002 VideoLAN
- * $Id: adpcm.c,v 1.3 2002/12/30 17:28:31 gbazin Exp $
+ * $Id: adpcm.c,v 1.4 2003/01/02 20:48:28 gbazin Exp $
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *      
@@ -305,9 +305,6 @@ static int InitThread( adec_thread_t * p_adec )
     p_adec->output_format.i_physical_channels = 
         p_adec->output_format.i_original_channels =
             pi_channels_maps[p_adec->p_wf->nChannels];
-    p_adec->output_format.i_bytes_per_frame =
-        p_adec->p_wf->nChannels * 2;
-    p_adec->output_format.i_frame_length = 1;
     p_adec->p_aout = NULL;
     p_adec->p_aout_input = NULL;
 
index c5cd13be455bf4e20cab3afc9f4d9b38ed7fa29e..3811c0e7cfba92c74afcf040c19971294767d0e2 100644 (file)
@@ -2,7 +2,7 @@
  * araw.c: Pseudo audio decoder; for raw pcm data
  *****************************************************************************
  * Copyright (C) 2001, 2002 VideoLAN
- * $Id: araw.c,v 1.9 2002/12/30 17:28:31 gbazin Exp $
+ * $Id: araw.c,v 1.10 2003/01/02 20:48:28 gbazin Exp $
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *      
@@ -247,8 +247,6 @@ static int InitThread( adec_thread_t * p_adec )
     p_adec->output_format.i_physical_channels = 
             p_adec->output_format.i_original_channels =
             pi_channels_maps[p_adec->p_wf->nChannels];
-    p_adec->output_format.i_bytes_per_frame = p_adec->p_wf->nBlockAlign;
-    p_adec->output_format.i_frame_length = 1;
     p_adec->p_aout = NULL;
     p_adec->p_aout_input = NULL;
 
index 837dea7c83b8fdcc3be7c307bef0b21c9d21f04b..1f3c3d3577a5f6d9558d9a652840f6ad52e41ffb 100644 (file)
@@ -2,7 +2,7 @@
  * decoder.c: AAC decoder using libfaad2
  *****************************************************************************
  * Copyright (C) 2001, 2002 VideoLAN
- * $Id: decoder.c,v 1.15 2002/12/30 17:28:31 gbazin Exp $
+ * $Id: decoder.c,v 1.16 2003/01/02 20:48:28 gbazin Exp $
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *      
@@ -407,9 +407,6 @@ static void DecodeThread( adec_thread_t *p_adec )
         p_adec->output_format.i_physical_channels =
             p_adec->output_format.i_original_channels =
                 pi_channels_maps[faad_frame.channels];
-        p_adec->output_format.i_bytes_per_frame =
-            faad_frame.channels * sizeof(float);
-        p_adec->output_format.i_frame_length = 1;
 
         aout_DateInit( &p_adec->date, p_adec->output_format.i_rate );
         p_adec->p_aout_input = aout_DecNew( p_adec->p_fifo,
index 15467dd6dee718cc1554272f01097e5f29f10d2f..65e22bd9983dfe9155097b83e607e3637681ca85 100644 (file)
@@ -2,7 +2,7 @@
  * audio.c: audio decoder using ffmpeg library
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: audio.c,v 1.9 2002/12/30 17:28:31 gbazin Exp $
+ * $Id: audio.c,v 1.10 2003/01/02 20:48:28 gbazin Exp $
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *
@@ -260,9 +260,6 @@ void  E_( DecodeThread_Audio )( adec_thread_t *p_adec )
         p_adec->output_format.i_physical_channels = 
             p_adec->output_format.i_original_channels = 
                 pi_channels_maps[p_adec->p_context->channels];
-        p_adec->output_format.i_bytes_per_frame =
-            p_adec->p_context->channels * sizeof(int16_t);
-        p_adec->output_format.i_frame_length = 1;
 
         aout_DateInit( &p_adec->date, p_adec->output_format.i_rate );
         p_adec->p_aout_input = aout_DecNew( p_adec->p_fifo,
index c483e4ec34367b5fe71ff8993dd943a32f865249..747eb1d083db3e4be5133d53574be89f5892b963 100644 (file)
@@ -2,7 +2,7 @@
  * lpcm.c: lpcm decoder module
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: lpcm.c,v 1.9 2002/12/30 17:28:31 gbazin Exp $
+ * $Id: lpcm.c,v 1.10 2003/01/02 20:48:28 gbazin Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Henri Fallon <henri@videolan.org>
@@ -259,8 +259,6 @@ static void DecodeFrame( dec_thread_t * p_dec )
         p_dec->output_format.i_original_channels = i_original_channels;
         p_dec->output_format.i_physical_channels
                    = i_original_channels & AOUT_CHAN_PHYSMASK;
-        p_dec->output_format.i_bytes_per_frame = i_nb_channels * 2;
-        p_dec->output_format.i_frame_length = 1;
         aout_DateInit( &p_dec->end_date, i_rate );
         p_dec->p_aout_input = aout_DecNew( p_dec->p_fifo,
                                            &p_dec->p_aout,
index ef41e675c4ce82bddd8b83384d45e5e6937b25a8..33bba9bde19d221556762bb3420cc456cbed4f2b 100644 (file)
@@ -180,9 +180,6 @@ enum mad_flow libmad_output( void *p_data, struct mad_header const *p_header,
         p_dec->output_format.i_rate = p_pcm->samplerate;
         p_dec->output_format.i_physical_channels = i_channels;
         p_dec->output_format.i_original_channels = i_channels;
-        p_dec->output_format.i_bytes_per_frame =
-            p_pcm->channels * sizeof(mad_fixed_t);
-        p_dec->output_format.i_frame_length = 1;
         aout_DateInit( &p_dec->end_date, p_pcm->samplerate );
         p_dec->p_aout_input = aout_DecNew( p_dec->p_fifo,
                                            &p_dec->p_aout,
index ed252d5aaad7dbffd3eb4c63c43aded31cda8eb5..e12569d9032586c4c02993c798ca324e267f26f8 100644 (file)
@@ -2,7 +2,7 @@
  * decoder.c: MPEG audio decoder thread
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: decoder.c,v 1.10 2002/12/30 17:28:31 gbazin Exp $
+ * $Id: decoder.c,v 1.11 2003/01/02 20:48:28 gbazin Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Michel Lespinasse <walken@via.ecp.fr>
@@ -192,9 +192,6 @@ static void DecodeThread( adec_thread_t * p_dec )
                ( sync_info.b_stereo ? AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT :
                  AOUT_CHAN_CENTER );
             p_dec->output_format.i_rate     = sync_info.sample_rate;
-            p_dec->output_format.i_bytes_per_frame =
-               ( sync_info.b_stereo ? 2 : 1 ) * sizeof(float);
-            p_dec->output_format.i_frame_length = 1;
             aout_DateInit( &p_dec->end_date, sync_info.sample_rate );
             p_dec->p_aout_input = aout_DecNew( p_dec->p_fifo,
                                                &p_dec->p_aout,
index 84286c43f9918404ac310553b41fcb8382a0b6f9..f3efa82c03ae1c33266108b3d20ea96e83c9cd22 100644 (file)
@@ -2,7 +2,7 @@
  * vorbis.c: vorbis decoder module making use of libvorbis.
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: vorbis.c,v 1.10 2002/12/30 17:28:31 gbazin Exp $
+ * $Id: vorbis.c,v 1.11 2003/01/02 20:48:28 gbazin Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -224,9 +224,6 @@ static int RunDecoder( decoder_fifo_t * p_fifo )
         p_dec->output_format.i_original_channels =
             pi_channels_maps[p_dec->vi.channels];
     p_dec->output_format.i_rate = p_dec->vi.rate;
-    p_dec->output_format.i_bytes_per_frame =
-        p_dec->vi.channels * sizeof(float);
-    p_dec->output_format.i_frame_length = 1;
 
     aout_DateInit( &p_dec->end_date, p_dec->vi.rate );
     p_dec->p_aout = NULL;
index 3efd90b77abe617687c0630e732a266e83b3a02e..51ad4e98e73a1e8b0e2b922dec25680e93c30206 100644 (file)
@@ -2,7 +2,7 @@
  * dec.c : audio output API towards decoders
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: dec.c,v 1.5 2002/12/28 02:02:18 massiot Exp $
+ * $Id: dec.c,v 1.6 2003/01/02 20:48:28 gbazin Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -69,7 +69,7 @@ static aout_input_t * DecNew( aout_instance_t * p_aout,
 
     p_input->b_changed = 0;
     p_input->b_error = 1;
-    aout_FormatPrepare( &p_format );
+    aout_FormatPrepare( p_format );
     memcpy( &p_input->input, p_format,
             sizeof(audio_sample_format_t) );