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

resource: add input_resource_ResetAout()

parent 147ccd1b
......@@ -663,4 +663,9 @@ VLC_API audio_output_t *input_resource_GetAout( input_resource_t * );
*/
VLC_API void input_resource_PutAout( input_resource_t *, audio_output_t * );
/**
* Prevents the existing audio output (if any) from being recycled.
*/
VLC_API void input_resource_ResetAout( input_resource_t * );
#endif
......@@ -392,12 +392,14 @@ audio_output_t *input_resource_HoldAout( input_resource_t *p_resource )
return p_aout;
}
static void input_resource_TerminateAout( input_resource_t *p_resource )
void input_resource_ResetAout( input_resource_t *p_resource )
{
audio_output_t *p_aout;
audio_output_t *p_aout = NULL;
vlc_mutex_lock( &p_resource->lock_hold );
if( !p_resource->b_aout_busy )
p_aout = p_resource->p_aout;
p_resource->p_aout = NULL;
p_resource->b_aout_busy = false;
vlc_mutex_unlock( &p_resource->lock_hold );
......@@ -507,7 +509,7 @@ void input_resource_TerminateSout( input_resource_t *p_resource )
void input_resource_Terminate( input_resource_t *p_resource )
{
input_resource_TerminateSout( p_resource );
input_resource_TerminateAout( p_resource );
input_resource_ResetAout( p_resource );
input_resource_TerminateVout( p_resource );
}
......@@ -220,6 +220,7 @@ input_resource_Terminate
input_resource_GetAout
input_resource_HoldAout
input_resource_PutAout
input_resource_ResetAout
input_Start
input_Stop
input_vaControl
......
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