Commit 7c03e6e3 authored by Sam Hocevar's avatar Sam Hocevar

  * Added a missing call to DecoderError() in mpeg_adec.c.
  * Fixed a segfault in the aRts plugin.
parent 9913ddd6
...@@ -114,12 +114,20 @@ static int aout_Open( aout_thread_t *p_aout ) ...@@ -114,12 +114,20 @@ static int aout_Open( aout_thread_t *p_aout )
p_aout->i_channels = 1 + main_GetIntVariable( AOUT_STEREO_VAR, AOUT_STEREO_DEFAULT ); p_aout->i_channels = 1 + main_GetIntVariable( AOUT_STEREO_VAR, AOUT_STEREO_DEFAULT );
p_aout->l_rate = AOUT_RATE_DEFAULT; p_aout->l_rate = AOUT_RATE_DEFAULT;
/* Allocate structure */
p_aout->p_sys = malloc( sizeof( aout_sys_t ) );
if( p_aout->p_sys == NULL )
{
intf_ErrMsg("error: %s", strerror(ENOMEM) );
return( 1 );
}
i_err = arts_init(); i_err = arts_init();
if (i_err < 0) if (i_err < 0)
{ {
fprintf(stderr, "arts_init error: %s\n", arts_error_text(i_err)); fprintf(stderr, "arts_init error: %s\n", arts_error_text(i_err));
free( p_aout->p_sys );
return(-1); return(-1);
} }
...@@ -175,5 +183,6 @@ static void aout_Play( aout_thread_t *p_aout, byte_t *buffer, int i_size ) ...@@ -175,5 +183,6 @@ static void aout_Play( aout_thread_t *p_aout, byte_t *buffer, int i_size )
static void aout_Close( aout_thread_t *p_aout ) static void aout_Close( aout_thread_t *p_aout )
{ {
arts_close_stream( p_aout->p_sys->stream ); arts_close_stream( p_aout->p_sys->stream );
free( p_aout->p_sys );
} }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* mpeg_adec.c: MPEG audio decoder thread * mpeg_adec.c: MPEG audio decoder thread
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: mpeg_adec.c,v 1.5.2.2 2001/12/31 01:21:45 massiot Exp $ * $Id: mpeg_adec.c,v 1.5.2.3 2001/12/31 03:59:59 sam Exp $
* *
* Authors: Michel Kaempf <maxx@via.ecp.fr> * Authors: Michel Kaempf <maxx@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr> * Michel Lespinasse <walken@via.ecp.fr>
...@@ -157,6 +157,7 @@ static int decoder_Run ( decoder_config_t * p_config ) ...@@ -157,6 +157,7 @@ static int decoder_Run ( decoder_config_t * p_config )
if ( p_adec->p_aout_fifo == NULL ) if ( p_adec->p_aout_fifo == NULL )
{ {
intf_ErrMsg("mpeg_adec error: cannot create audio output fifo"); intf_ErrMsg("mpeg_adec error: cannot create audio output fifo");
DecoderError( p_config->p_decoder_fifo );
return -1; return -1;
} }
......
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