[vlc-commits] input: init video/audio/spu es to -1
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:12:52 2017 +0200| [66a197c869dc3a4a019208d781522e2519f9f5ff] | committer: Thomas Guillem
input: init video/audio/spu es to -1
This commit avoids to return a (valid) track of 0 when the track is disabled.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=66a197c869dc3a4a019208d781522e2519f9f5ff
---
src/input/var.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/input/var.c b/src/input/var.c
index 17ea1ea..a9dcd46 100644
--- a/src/input/var.c
+++ b/src/input/var.c
@@ -184,18 +184,22 @@ void input_ControlVarInit ( input_thread_t *p_input )
1000 * var_GetInteger( p_input, "audio-desync" ) );
var_Create( p_input, "spu-delay", VLC_VAR_INTEGER );
+ val.i_int = -1;
/* Video ES */
var_Create( p_input, "video-es", VLC_VAR_INTEGER );
+ var_Change( p_input, "video-es", VLC_VAR_SETVALUE, &val, NULL );
text.psz_string = _("Video Track");
var_Change( p_input, "video-es", VLC_VAR_SETTEXT, &text, NULL );
/* Audio ES */
var_Create( p_input, "audio-es", VLC_VAR_INTEGER );
+ var_Change( p_input, "audio-es", VLC_VAR_SETVALUE, &val, NULL );
text.psz_string = _("Audio Track");
var_Change( p_input, "audio-es", VLC_VAR_SETTEXT, &text, NULL );
/* Spu ES */
var_Create( p_input, "spu-es", VLC_VAR_INTEGER );
+ var_Change( p_input, "spu-es", VLC_VAR_SETVALUE, &val, NULL );
text.psz_string = _("Subtitle Track");
var_Change( p_input, "spu-es", VLC_VAR_SETTEXT, &text, NULL );
More information about the vlc-commits
mailing list