Commit 2216d29e authored by Gildas Bazin's avatar Gildas Bazin

* modules/codec/*: reverted my previous patch that explicitly set
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.
parent 08f42608
......@@ -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;
......
......@@ -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;
......
......@@ -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,
......
......@@ -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,
......
......@@ -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,
......
......@@ -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,
......
......@@ -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,
......
......@@ -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;
......
......@@ -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) );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment