[vlc-devel] [PATCH] input: automatically select subtitle attachments

Thomas Guillem thomas at gllm.fr
Mon Oct 30 15:58:04 CET 2017


Thanks, this patch is merged.

On Mon, Oct 30, 2017, at 13:07, Salah-Eddin Shaban wrote:
> If no sub track has already been selected via sub-file or autodetection.
> 
> Close #18897
> ---
>  src/input/input.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/src/input/input.c b/src/input/input.c
> index f03448445b..aa55dd7f8f 100644
> --- a/src/input/input.c
> +++ b/src/input/input.c
> @@ -1194,8 +1194,11 @@ static void LoadSlaves( input_thread_t *p_input )
>          {
>              var_SetString( p_input, "sub-description",
>              a->psz_description ? a->psz_description : "");
>  
> -            input_SlaveSourceAdd( p_input, SLAVE_TYPE_SPU, psz_mrl,
> -                                  SLAVE_ADD_NOFLAG );
> +            if( input_SlaveSourceAdd( p_input, SLAVE_TYPE_SPU, psz_mrl,
> +                                      p_forced[ SLAVE_TYPE_SPU ] ?
> +                                      SLAVE_ADD_NOFLAG :
> SLAVE_ADD_FORCED ) == VLC_SUCCESS )
> +                p_forced[ SLAVE_TYPE_SPU ] = true;
> +
>              free( psz_mrl );
>              /* Don't update item slaves for attachements */
>          }
> -- 
> 2.12.3
> 
> _______________________________________________
> 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