summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/liba52/a52.h2
-rw-r--r--src/liba52/parse.c12
-rw-r--r--src/liba52/xine_decoder.c8
3 files changed, 13 insertions, 9 deletions
diff --git a/src/liba52/a52.h b/src/liba52/a52.h
index 6825ec2bf..6b3cecddd 100644
--- a/src/liba52/a52.h
+++ b/src/liba52/a52.h
@@ -105,7 +105,7 @@ typedef struct a52_state_s {
#define A52_LFE 16
#define A52_ADJUST_LEVEL 32
-sample_t * a52_init (uint32_t mm_accel);
+sample_t * a52_init (uint32_t mm_accel, sample_t **samples_base);
int a52_syncinfo (uint8_t * buf, int * flags,
int * sample_rate, int * bit_rate);
int a52_frame (a52_state_t * state, uint8_t * buf, int * flags,
diff --git a/src/liba52/parse.c b/src/liba52/parse.c
index e98841902..3e5f99256 100644
--- a/src/liba52/parse.c
+++ b/src/liba52/parse.c
@@ -40,17 +40,21 @@ static int q_4_pointer;
static uint8_t halfrate[12] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3};
-sample_t * a52_init (uint32_t mm_accel)
+sample_t * a52_init (uint32_t mm_accel, sample_t **samples_base)
{
- sample_t * samples, *samples_base;
+ sample_t * samples;
int i;
imdct_init (mm_accel);
samples = xine_xmalloc_aligned (16, 256 * 12 * sizeof (sample_t),
- &samples_base);
- if (samples == NULL)
+ samples_base);
+ if (samples == NULL) {
+
+ printf ("liba52: samples malloc failed!\n");
+
return NULL;
+ }
for (i = 0; i < 256 * 12; i++)
samples[i] = 0;
diff --git a/src/liba52/xine_decoder.c b/src/liba52/xine_decoder.c
index a8db3fb4f..fb8d5fbd1 100644
--- a/src/liba52/xine_decoder.c
+++ b/src/liba52/xine_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_decoder.c,v 1.19 2002/03/19 17:48:59 guenter Exp $
+ * $Id: xine_decoder.c,v 1.20 2002/03/24 18:45:42 guenter Exp $
*
* stuff needed to turn liba52 into a xine decoder plugin
*/
@@ -69,7 +69,7 @@ typedef struct a52dec_decoder_s {
int a52_flags_map[11];
int ao_flags_map[11];
- sample_t *samples;
+ sample_t *samples, *samples_base;
ao_instance_t *audio_out;
int audio_caps;
@@ -159,7 +159,7 @@ void a52dec_init (audio_decoder_t *this_gen, ao_instance_t *audio_out) {
this->last_pts = 0;
if( !this->samples )
- this->samples = a52_init (xine_mm_accel());
+ this->samples = a52_init (xine_mm_accel(), &this->samples_base);
/*
* find out if this driver supports a52 output
@@ -536,7 +536,7 @@ void a52dec_close (audio_decoder_t *this_gen) {
this->audio_out->close (this->audio_out);
if( this->samples ) {
- xine_free_aligned( this->samples );
+ free (this->samples_base);
this->samples = NULL;
}