@ -817,27 +817,10 @@ static void RunThread( adec_thread_t * p_adec )
}
else
{
// i_header = p_adec->bit_stream.fifo.buffer;
// i_framesize = pi_framesize[ 128*((i_header & ADEC_HEADER_LAYER_MASK) >> ADEC_HEADER_LAYER_SHIFT) +
// 64*((i_header & ADEC_HEADER_PADDING_BIT_MASK) >> ADEC_HEADER_PADDING_BIT_SHIFT) +
// 16*((i_header & ADEC_HEADER_SAMPLING_FREQUENCY_MASK) >> ADEC_HEADER_SAMPLING_FREQUENCY_SHIFT) +
// 1*((i_header & ADEC_HEADER_BITRATE_INDEX_MASK) >> ADEC_HEADER_BITRATE_INDEX_SHIFT) ];
// for ( i_dummy = 0; i_dummy < i_framesize; i_dummy++ )
// {
// GetByte( &p_adec->bit_stream );
// }
// for ( i_dummy = 0; i_dummy < 512; i_dummy++ )
// {
// p_adec->bank_0.v1[ i_dummy ] = .0;
// p_adec->bank_1.v1[ i_dummy ] = .0;
// p_adec->bank_0.v2[ i_dummy ] = .0;
// p_adec->bank_1.v2[ i_dummy ] = .0;
// }
/* Waiting until there is enough free space in the audio output fifo
* in order to store the new decoded frames */
vlc_mutex_lock ( & p_adec - > p_aout_fifo - > data_lock ) ;
/* adec_Layer2_Stereo() produces 6 output frames (2*1152/384)...
/* adec_Layer2_Stereo() produces 6 output frames (2*1152/384)...
* If these 6 frames were recorded in the audio output fifo , the
* l_end_frame index would be incremented 6 times . But , if after
* this operation the audio output fifo contains less than 6 frames ,
@ -846,33 +829,22 @@ static void RunThread( adec_thread_t * p_adec )
{
vlc_cond_wait ( & p_adec - > p_aout_fifo - > data_wait , & p_adec - > p_aout_fifo - > data_lock ) ;
}
if ( DECODER_FIFO_START ( p_adec - > fifo ) - > b_has_pts )
{
p_adec - > p_aout_fifo - > date [ p_adec - > p_aout_fifo - > l_end_frame ] = DECODER_FIFO_START ( p_adec - > fifo ) - > i_pts ;
DECODER_FIFO_START ( p_adec - > fifo ) - > b_has_pts = 0 ;
}
else
{
p_adec - > p_aout_fifo - > date [ p_adec - > p_aout_fifo - > l_end_frame ] = LAST_MDATE ;
}
if ( DECODER_FIFO_START ( p_adec - > fifo ) - > b_has_pts )
{
p_adec - > p_aout_fifo - > date [ p_adec - > p_aout_fifo - > l_end_frame ] = DECODER_FIFO_START ( p_adec - > fifo ) - > i_pts ;
DECODER_FIFO_START ( p_adec - > fifo ) - > b_has_pts = 0 ;
}
else
{
p_adec - > p_aout_fifo - > date [ p_adec - > p_aout_fifo - > l_end_frame ] = LAST_MDATE ;
}
vlc_mutex_unlock ( & p_adec - > p_aout_fifo - > data_lock ) ;
/* Decoding the frames */
/* Decoding the frames */
if ( adec_Layer2_Stereo ( p_adec ) )
{
vlc_mutex_lock ( & p_adec - > p_aout_fifo - > data_lock ) ;
/* Frame 1 */
/*
if ( DECODER_FIFO_START ( p_adec - > fifo ) - > b_has_pts )
{
p_adec - > p_aout_fifo - > date [ p_adec - > p_aout_fifo - > l_end_frame ] = DECODER_FIFO_START ( p_adec - > fifo ) - > i_pts ;
DECODER_FIFO_START ( p_adec - > fifo ) - > b_has_pts = 0 ;
}
else
{
p_adec - > p_aout_fifo - > date [ p_adec - > p_aout_fifo - > l_end_frame ] = LAST_MDATE ;
}
*/
p_adec - > p_aout_fifo - > l_end_frame = ( p_adec - > p_aout_fifo - > l_end_frame + 1 ) & AOUT_FIFO_SIZE ;
/* Frame 2 */
p_adec - > p_aout_fifo - > date [ p_adec - > p_aout_fifo - > l_end_frame ] = LAST_MDATE ;