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

decoder: do not emit output events if there is no input

parent 856c0064
...@@ -2088,6 +2088,7 @@ static void DeleteDecoder( decoder_t * p_dec ) ...@@ -2088,6 +2088,7 @@ static void DeleteDecoder( decoder_t * p_dec )
if( p_owner->p_aout ) if( p_owner->p_aout )
{ {
input_resource_RequestAout( p_owner->p_resource, p_owner->p_aout ); input_resource_RequestAout( p_owner->p_resource, p_owner->p_aout );
if( p_owner->p_input != NULL )
input_SendEventAout( p_owner->p_input ); input_SendEventAout( p_owner->p_input );
p_owner->p_aout = NULL; p_owner->p_aout = NULL;
} }
...@@ -2100,6 +2101,7 @@ static void DeleteDecoder( decoder_t * p_dec ) ...@@ -2100,6 +2101,7 @@ static void DeleteDecoder( decoder_t * p_dec )
/* */ /* */
input_resource_RequestVout( p_owner->p_resource, p_owner->p_vout, NULL, input_resource_RequestVout( p_owner->p_resource, p_owner->p_vout, NULL,
0, true ); 0, true );
if( p_owner->p_input != NULL )
input_SendEventVout( p_owner->p_input ); input_SendEventVout( p_owner->p_input );
} }
...@@ -2182,6 +2184,7 @@ static vout_thread_t *aout_request_vout( void *p_private, ...@@ -2182,6 +2184,7 @@ static vout_thread_t *aout_request_vout( void *p_private,
p_vout = input_resource_RequestVout( p_owner->p_resource, p_vout, p_fmt, 1, p_vout = input_resource_RequestVout( p_owner->p_resource, p_vout, p_fmt, 1,
b_recyle ); b_recyle );
if( p_input != NULL )
input_SendEventVout( p_input ); input_SendEventVout( p_input );
return p_vout; return p_vout;
...@@ -2257,6 +2260,7 @@ static aout_buffer_t *aout_new_buffer( decoder_t *p_dec, int i_samples ) ...@@ -2257,6 +2260,7 @@ static aout_buffer_t *aout_new_buffer( decoder_t *p_dec, int i_samples )
vlc_mutex_unlock( &p_owner->lock ); vlc_mutex_unlock( &p_owner->lock );
if( p_owner->p_input != NULL )
input_SendEventAout( p_owner->p_input ); input_SendEventAout( p_owner->p_input );
if( p_owner->p_aout_input == NULL ) if( p_owner->p_aout_input == NULL )
...@@ -2382,6 +2386,7 @@ static picture_t *vout_new_buffer( decoder_t *p_dec ) ...@@ -2382,6 +2386,7 @@ static picture_t *vout_new_buffer( decoder_t *p_dec )
vlc_mutex_unlock( &p_owner->lock ); vlc_mutex_unlock( &p_owner->lock );
if( p_owner->p_input != NULL )
input_SendEventVout( p_owner->p_input ); input_SendEventVout( p_owner->p_input );
if( p_vout == NULL ) if( p_vout == NULL )
{ {
......
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