[vlc-devel] [PATCH] input: don't pass subtitle path URLs to vlc_path2uri()

Rémi Denis-Courmont remi at remlab.net
Mon Dec 26 20:53:56 CET 2016


Le lundi 26 décembre 2016, 14:47:59 Frank Praznik a écrit :
> Subtitles can be manually loaded from paths which are represented as URLs
> and these paths should not be passed to vlc_path2uri().
> 
> Signed-off-by: Frank Praznik <frank.praznik at gmail.com>
> ---
>  - Fixes an issue with subtitles on remote paths failing to load when
> manually - selected.
> 
>  src/input/input.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/src/input/input.c b/src/input/input.c
> index 0f71040..b2bef4d 100644
> --- a/src/input/input.c
> +++ b/src/input/input.c
> @@ -3192,7 +3192,12 @@ static char *input_SubtitleFile2Uri( input_thread_t
> *p_input, }
>      }
> 
> -    char *psz_uri = vlc_path2uri( psz_subtitle, NULL );
> +    char *psz_uri;
> +    if( strstr( psz_subtitle, "://" ) == NULL )
> +        psz_uri = vlc_path2uri( psz_subtitle, NULL );
> +    else
> +        psz_uri = strdup( psz_subtitle );
> +
>      free( psz_idxpath );
>      return psz_uri;
>  }

No thanks. This function expects a file path, not an URI.

-- 
Rémi Denis-Courmont
http://www.remlab.net/


More information about the vlc-devel mailing list