[vlc-commits] input: keep sout from renderers
Thomas Guillem
git at videolan.org
Wed Jan 31 16:25:43 CET 2018
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Jan 31 16:04:50 2018 +0100| [4f05cf3c20795e62be49aca76b5815ade4071dfa] | committer: Thomas Guillem
input: keep sout from renderers
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4f05cf3c20795e62be49aca76b5815ade4071dfa
---
src/input/input.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/input/input.c b/src/input/input.c
index 14f114ceb4..c1beba330e 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -817,15 +817,20 @@ static int InitSout( input_thread_t * p_input )
return VLC_SUCCESS;
/* Find a usable sout and attach it to p_input */
- char *psz = NULL;
+ char *psz = var_GetNonEmptyString( p_input, "sout" );
if( priv->p_renderer )
{
+ /* Keep sout if it comes from a renderer and if the user didn't touch
+ * the sout config */
+ bool keep_sout = psz == NULL;
+ free(psz);
+
const char *psz_renderer_sout = vlc_renderer_item_sout( priv->p_renderer );
if( asprintf( &psz, "#%s", psz_renderer_sout ) < 0 )
return VLC_ENOMEM;
+ if( keep_sout )
+ var_SetBool( p_input, "sout-keep", true );
}
- if( !psz )
- psz = var_GetNonEmptyString( p_input, "sout" );
if( psz && strncasecmp( priv->p_item->psz_uri, "vlc:", 4 ) )
{
priv->p_sout = input_resource_RequestSout( priv->p_resource, NULL, psz );
More information about the vlc-commits
mailing list