* ac3_decoder_thread.c: ac3 decoder thread
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: ac3_decoder_thread.c,v 1.36 2001/08/05 15:32:46 gbazin Exp $
+ * $Id: ac3_decoder_thread.c,v 1.37 2001/09/05 16:46:10 massiot Exp $
*
* Authors: Michel Lespinasse <walken@zoy.org>
*
/* Allocate the memory needed to store the thread's structure */
p_ac3thread_temp = (ac3dec_thread_t *)malloc(sizeof(ac3dec_thread_t) + 15);
+ memset( p_ac3thread_temp, 0, sizeof(ac3dec_thread_t) + 15 );
/* We need to be 16 bytes aligned */
p_ac3thread = (ac3dec_thread_t *)(((unsigned long)p_ac3thread_temp + 15)
* adec_generic.c: MPEG audio decoder
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: adec_generic.c,v 1.5 2001/04/06 09:15:47 sam Exp $
+ * $Id: adec_generic.c,v 1.6 2001/09/05 16:46:10 massiot Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr>
p_adec->header = header;
- /* basic header check : sync word, no emphasis */
- if( (header & 0xfff00003) != 0xfff00000 )
+ /* basic header check : sync word */
+ if( (header & 0xfff00000) != 0xfff00000 )
{
return 1;
}
/* calculate bit rate */
index = ( header >> 17 ) & 7; /* mpeg ID + layer */
bit_rates = bit_rate_table[ index ];
- if( bit_rate_table == NULL )
+ if( bit_rates == NULL )
{
return 1; /* invalid layer */
}