Commit 5b322485 authored by Gildas Bazin's avatar Gildas Bazin


* a52 plugin updated to use liba52-0.7.3 ( which is now available on debian :)
parent 2ce7beda
......@@ -4,7 +4,7 @@
* (http://liba52.sf.net/).
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: a52.c,v 1.5 2002/02/24 22:06:50 sam Exp $
* $Id: a52.c,v 1.6 2002/03/12 20:39:50 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -187,8 +187,8 @@ static int InitThread( a52_adec_thread_t * p_a52_adec )
intf_WarnMsg( 3, "a52: InitThread" );
/* Initialize liba52 */
p_a52_adec->p_decoded_samples = a52_init( 0 );
if( p_a52_adec->p_decoded_samples == NULL )
p_a52_adec->p_a52_state = a52_init( 0 );
if( p_a52_adec->p_a52_state == NULL )
{
intf_ErrMsg ( "a52 error: InitThread() unable to initialize "
"liba52" );
......@@ -266,15 +266,15 @@ static int DecodeFrame( a52_adec_thread_t * p_a52_adec )
p_a52_adec->frame_size - 7 );
/* do the actual decoding now */
a52_frame( &p_a52_adec->a52_state, p_a52_adec->p_frame_buffer,
a52_frame( p_a52_adec->p_a52_state, p_a52_adec->p_frame_buffer,
&p_a52_adec->flags, &sample_level, 384 );
for( i = 0; i < 6; i++ )
{
if( a52_block(&p_a52_adec->a52_state, p_a52_adec->p_decoded_samples) )
if( a52_block( p_a52_adec->p_a52_state ) )
intf_WarnMsg( 5, "a52: a52_block failed for block %i", i );
float2s16_2( p_a52_adec->p_decoded_samples,
float2s16_2( a52_samples( p_a52_adec->p_a52_state ),
((int16_t *)p_buffer) + i * 256 * p_a52_adec->i_channels );
}
......@@ -306,6 +306,7 @@ static void EndThread (a52_adec_thread_t *p_a52_adec)
vlc_mutex_unlock (&(p_a52_adec->p_aout_fifo->data_lock));
}
a52_free( p_a52_adec->p_a52_state );
free( p_a52_adec );
}
......
......@@ -4,7 +4,7 @@
* (http://liba52.sf.net/).
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: a52.h,v 1.1 2002/02/06 20:44:22 gbazin Exp $
* $Id: a52.h,v 1.2 2002/03/12 20:39:50 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -31,12 +31,11 @@ typedef struct a52_adec_thread_s
/*
* liba52 properties
*/
a52_state_t a52_state;
a52_state_t *p_a52_state;
int frame_size;
int flags;
int sample_rate;
int bit_rate;
sample_t *p_decoded_samples;
/* The bit stream structure handles the PES stream at the bit level */
bit_stream_t bit_stream;
......
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