[vlc-commits] input: keep sout from renderers
Thomas Guillem
git at videolan.org
Thu Feb 1 11:26:21 CET 2018
vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Jan 31 16:04:50 2018 +0100| [c363e423aa6b76503797709570a418ea36beeb2b] | committer: Thomas Guillem
input: keep sout from renderers
(cherry picked from commit 4f05cf3c20795e62be49aca76b5815ade4071dfa)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=c363e423aa6b76503797709570a418ea36beeb2b
---
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 6dded7d0f8..93236e1924 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -845,15 +845,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