[vlc-devel] [PATCH 5/5] input: if there's a p_sout left, push it in the resource cache for reuse
Steve Lhomme
robux4 at videolabs.io
Fri Apr 22 17:56:45 CEST 2016
if the string of the new sout matches the one already in use, it will be reused
and free'd otherwise
---
src/input/input.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/input/input.c b/src/input/input.c
index b740899..8e510ca 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -819,6 +819,9 @@ static int InitSout( input_thread_t * p_input )
char *psz = var_GetNonEmptyString( p_input, "sout" );
if( psz && strncasecmp( p_input->p->p_item->psz_uri, "vlc:", 4 ) )
{
+ /* push the old sout for possible reuse */
+ if ( p_input->p->p_sout )
+ 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, NULL, psz );
if( !p_input->p->p_sout )
{
--
2.7.0
More information about the vlc-devel
mailing list