[vlc-devel] [PATCH 1/2] lib/audio: Disable audio track if requested
GOUJON Évan
goujon.evan at gmail.com
Mon Mar 28 13:13:09 CEST 2016
---
lib/audio.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/lib/audio.c b/lib/audio.c
index 7901c64..03a5df4 100644
--- a/lib/audio.c
+++ b/lib/audio.c
@@ -419,6 +419,16 @@ int libvlc_audio_set_track( libvlc_media_player_t *p_mi, int i_track )
if( !p_input_thread )
return -1;
+ if( i_track == -1 )
+ {
+ if( var_SetInteger( p_input_thread, "audio-es", i_track ) < 0 )
+ libvlc_printerr( "Unable to disable sound track" );
+ else
+ i_ret = 0;
+ vlc_object_release( p_input_thread );
+ return i_ret;
+ }
+
var_Change( p_input_thread, "audio-es", VLC_VAR_GETCHOICES, &val_list, NULL );
for( int i = 0; i < val_list.p_list->i_count; i++ )
{
--
2.5.0
More information about the vlc-devel
mailing list