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

Revert "input: create an aout if UI wants to configure audio"

Due to mismatched "resource" and "hold" locks, this introduced a race
where more than one audio output gets created.

This reverts commit 4e57bd05.
parent 26af6a03
......@@ -387,11 +387,6 @@ audio_output_t *input_resource_HoldAout( input_resource_t *p_resource )
vlc_mutex_lock( &p_resource->lock_hold );
p_aout = p_resource->p_aout;
if( p_aout == NULL )
{ /* No audio outputs exist yet. Create an idle one. */
p_aout = aout_New( p_resource->p_parent );
p_resource->p_aout = p_aout;
}
if( p_aout )
vlc_object_hold( p_aout );
vlc_mutex_unlock( &p_resource->lock_hold );
......
......@@ -33,6 +33,10 @@
audio_output_t *playlist_GetAout(playlist_t *pl)
{
/* NOTE: it is assumed that the input resource exists. In practice,
* the playlist must have been activated. This is automatic when calling
* pl_Get(). FIXME: input resources are deleted at deactivation, this can
* be too early. */
playlist_private_t *sys = pl_priv(pl);
return input_resource_HoldAout(sys->p_input_resource);
}
......
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