Commit a667c904 authored by Christophe Massiot's avatar Christophe Massiot

* MPEG audio emphasis fix, courtesy of Matthieu Lochegnies

<lochegm1@cti.ecp.fr> ;
* ac3dec uninitialized data structure fix, courtesy of Damian Ivereigh
<damian@cisco.com>.
parent 39c1b3e8
......@@ -2,7 +2,7 @@
* 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>
*
......@@ -84,6 +84,7 @@ vlc_thread_t ac3dec_CreateThread( adec_config_t * p_config )
/* 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)
......
......@@ -2,7 +2,7 @@
* 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>
......@@ -86,8 +86,8 @@ int adec_SyncFrame( adec_thread_t * p_adec, adec_sync_info_t * p_sync_info )
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;
}
......@@ -95,7 +95,7 @@ int adec_SyncFrame( adec_thread_t * p_adec, adec_sync_info_t * p_sync_info )
/* 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 */
}
......
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