[vlc-devel] [PATCH] src: allow language lookup with the full name

Hugo Beauzée-Luyssen hugo at beauzee.fr
Mon Apr 11 21:44:28 CEST 2016


On 04/11/2016 09:07 PM, Jean-Baptiste Kempf wrote:
> If the es.psz_lang provided is not using a shortcode (2 or 3), then it would
> fail to find it.
>
> Close #16810
>
> --
>
> Maybe we prefer the demuxers to fill this info?
> ---
>   src/input/es_out.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/input/es_out.c b/src/input/es_out.c
> index a5aee4d..94c9f01 100644
> --- a/src/input/es_out.c
> +++ b/src/input/es_out.c
> @@ -2754,7 +2754,7 @@ static char *LanguageGetName( const char *psz_code )
>       }
>       else
>       {
> -        return strdup( psz_code );
> +        pl = GetLang_1( LanguageGetCode( psz_code ) );
>       }
>
>       if( !strcmp( pl->psz_iso639_1, "??" ) )
>
This seems to be leaking LanguageGetCode's return value.

Regards,


More information about the vlc-devel mailing list