[vlc-devel] [PATCH 2/2] lib/video: Disable video track if requested

Thomas Guillem thomas at gllm.fr
Tue Mar 29 15:24:46 CEST 2016


On Mon, Mar 28, 2016, at 13:13, GOUJON Évan wrote:
> ---
>  lib/video.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/lib/video.c b/lib/video.c
> index b2c9b34..5738f3a 100644
> --- a/lib/video.c
> +++ b/lib/video.c
> @@ -547,6 +547,16 @@ int libvlc_video_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, "video-es", i_track ) < 0 )
> +            libvlc_printerr( "Unable to disable video track" );
> +        else
> +            i_ret = 0;
> +        vlc_object_release( p_input_thread );
> +        return i_ret;
> +    }
> +

I don't think this is needed, the -1 track is always added in
"audio/video/spu-es" varlist by es_out.c, see the "First one, we need to
add the "Disable" choice" comment.


>      var_Change( p_input_thread, "video-es", VLC_VAR_GETCHOICES,
>      &val_list, NULL );
>      for( int i = 0; i < val_list.p_list->i_count; i++ )
>      {
> -- 
> 2.5.0
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list