Commit a398f405 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Remove audio output recycling support. It kept crashing.

parent 5a3ede13
...@@ -173,30 +173,21 @@ aout_input_t * __aout_DecNew( vlc_object_t * p_this, ...@@ -173,30 +173,21 @@ aout_input_t * __aout_DecNew( vlc_object_t * p_this,
audio_sample_format_t * p_format, audio_sample_format_t * p_format,
audio_replay_gain_t *p_replay_gain ) audio_replay_gain_t *p_replay_gain )
{ {
if ( *pp_aout == NULL ) aout_instance_t *p_aout = *pp_aout;
{ if ( p_aout == NULL )
/* Create an audio output if there is none. */
*pp_aout = vlc_object_find( p_this, VLC_OBJECT_AOUT, FIND_ANYWHERE );
if( *pp_aout == NULL )
{ {
msg_Dbg( p_this, "no aout present, spawning one" ); msg_Dbg( p_this, "no aout present, spawning one" );
p_aout = aout_New( p_this );
*pp_aout = aout_New( p_this );
/* Everything failed, I'm a loser, I just wanna die */ /* Everything failed, I'm a loser, I just wanna die */
if( *pp_aout == NULL ) if( p_aout == NULL )
{
return NULL; return NULL;
}
vlc_object_attach( *pp_aout, p_this->p_libvlc ); vlc_object_attach( p_aout, p_this );
} *pp_aout = p_aout;
else
{
vlc_object_release( *pp_aout );
}
} }
return DecNew( p_this, *pp_aout, p_format, p_replay_gain ); return DecNew( p_this, p_aout, p_format, p_replay_gain );
} }
/***************************************************************************** /*****************************************************************************
......
...@@ -986,7 +986,11 @@ static void DeleteDecoder( decoder_t * p_dec ) ...@@ -986,7 +986,11 @@ static void DeleteDecoder( decoder_t * p_dec )
/* Cleanup */ /* Cleanup */
if( p_dec->p_owner->p_aout_input ) if( p_dec->p_owner->p_aout_input )
aout_DecDelete( p_dec->p_owner->p_aout, p_dec->p_owner->p_aout_input ); aout_DecDelete( p_dec->p_owner->p_aout, p_dec->p_owner->p_aout_input );
if( p_dec->p_owner->p_aout )
{
aout_Delete( p_dec->p_owner->p_aout );
p_dec->p_owner->p_aout = NULL;
}
if( p_dec->p_owner->p_vout ) if( p_dec->p_owner->p_vout )
{ {
int i_pic; int i_pic;
......
...@@ -945,15 +945,6 @@ int libvlc_InternalCleanup( libvlc_int_t *p_libvlc ) ...@@ -945,15 +945,6 @@ int libvlc_InternalCleanup( libvlc_int_t *p_libvlc )
vout_Destroy( p_vout ); vout_Destroy( p_vout );
} }
/* Free audio outputs */
msg_Dbg( p_libvlc, "removing all audio outputs" );
while( (p_aout = vlc_object_find( p_libvlc, VLC_OBJECT_AOUT, FIND_CHILD )) )
{
vlc_object_detach( (vlc_object_t *)p_aout );
vlc_object_release( (vlc_object_t *)p_aout );
aout_Delete( p_aout );
}
#ifdef ENABLE_SOUT #ifdef ENABLE_SOUT
playlist_t * p_playlist; playlist_t * p_playlist;
sout_instance_t * p_sout; sout_instance_t * p_sout;
......
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