[vlc-commits] input: enable es when selecting a new track

Thomas Guillem git at videolan.org
Tue Mar 28 14:25:58 CEST 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Mar 28 14:09:10 2017 +0200| [17d3e82bceece079c89df3443b529783acd9f74d] | committer: Thomas Guillem

input: enable es when selecting a new track

This commit allows video/audio/spu tracks to be selected even if the media was
started without video/audio/spu. (--no-{video/audio/spu} option).

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=17d3e82bceece079c89df3443b529783acd9f74d
---

 src/input/var.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/input/var.c b/src/input/var.c
index ee5a2a7..f41dac5 100644
--- a/src/input/var.c
+++ b/src/input/var.c
@@ -767,6 +767,8 @@ static int EsVideoCallback( vlc_object_t *p_this, char const *psz_cmd,
 
     if( newval.i_int < 0 )
         newval.i_int = -VIDEO_ES; /* disable video es */
+    else
+        var_SetBool( p_input, "video", true );
 
     input_ControlPush( p_input, INPUT_CONTROL_SET_ES, &newval );
 
@@ -781,6 +783,8 @@ static int EsAudioCallback( vlc_object_t *p_this, char const *psz_cmd,
 
     if( newval.i_int < 0 )
         newval.i_int = -AUDIO_ES; /* disable audio es */
+    else
+        var_SetBool( p_input, "audio", true );
 
     input_ControlPush( p_input, INPUT_CONTROL_SET_ES, &newval );
 
@@ -795,6 +799,8 @@ static int EsSpuCallback( vlc_object_t *p_this, char const *psz_cmd,
 
     if( newval.i_int < 0 )
         newval.i_int = -SPU_ES; /* disable spu es */
+    else
+        var_SetBool( p_input, "spu", true );
 
     input_ControlPush( p_input, INPUT_CONTROL_SET_ES, &newval );
 



More information about the vlc-commits mailing list