* Fixed a segfault in the aRts plugin.
p_aout->i_channels = 1 + main_GetIntVariable( AOUT_STEREO_VAR, AOUT_STEREO_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();
if (i_err < 0)
{
fprintf(stderr, "arts_init error: %s\n", arts_error_text(i_err));
+ free( p_aout->p_sys );
return(-1);
}
static void aout_Close( aout_thread_t *p_aout )
{
arts_close_stream( p_aout->p_sys->stream );
+ free( p_aout->p_sys );
}
* mpeg_adec.c: MPEG audio decoder thread
*****************************************************************************
* 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>
* Michel Lespinasse <walken@via.ecp.fr>
if ( p_adec->p_aout_fifo == NULL )
{
intf_ErrMsg("mpeg_adec error: cannot create audio output fifo");
+ DecoderError( p_config->p_decoder_fifo );
return -1;
}