[vlc-devel] [PATCH 3/5] input: don't keep the sout reference when it's released
Steve Lhomme
robux4 at videolabs.io
Fri Apr 22 17:56:43 CEST 2016
these lines tell the resources not to provide the SOUT anymore so the input
shouldn't use it either
---
src/input/input.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/input/input.c b/src/input/input.c
index 5591a4e..fbaf291 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -837,7 +837,8 @@ static int InitSout( input_thread_t * p_input )
}
else
{
- input_resource_RequestSout( p_input->p->p_resource, NULL, NULL );
+ p_input->p->p_sout = input_resource_RequestSout( p_input->p->p_resource,
+ NULL, NULL );
}
free( psz );
@@ -1244,7 +1245,7 @@ error:
if( p_input->p->p_resource )
{
if( p_input->p->p_sout )
- input_resource_RequestSout( p_input->p->p_resource,
+ p_input->p->p_sout = input_resource_RequestSout( p_input->p->p_resource,
p_input->p->p_sout, NULL );
input_resource_SetInput( p_input->p->p_resource, NULL );
if( p_input->p->p_resource_private )
@@ -1359,8 +1360,8 @@ static void End( input_thread_t * p_input )
vlc_mutex_unlock( &p_input->p->p_item->lock );
/* */
- input_resource_RequestSout( p_input->p->p_resource,
- p_input->p->p_sout, NULL );
+ p_input->p->p_sout = input_resource_RequestSout( p_input->p->p_resource,
+ p_input->p->p_sout, NULL );
input_resource_SetInput( p_input->p->p_resource, NULL );
if( p_input->p->p_resource_private )
input_resource_Terminate( p_input->p->p_resource_private );
--
2.7.0
More information about the vlc-devel
mailing list