[vlc-devel] [PATCH] demux: hls: playlist: fall back to "C" locale

Francois Cartegnie fcvlcdev at free.fr
Sun Dec 6 11:13:53 CET 2015


Le 06/12/2015 10:58, KO Myung-Hun a écrit :
> Some systems such as OS/2, do not support other locales than C and
> POSIX. And those locales cause SIGABRT due to std::runtime_error
> exception, especially, when playing youtube live streaming.


>      std::istringstream is(value);
> -    is.imbue(std::locale(""));
> +    try
> +    {
> +        is.imbue(std::locale(""));
> +    }
> +    catch(const std::runtime_error &e)
> +    {
> +        is.imbue(std::locale("C"));
> +    }


The std::locale("") was wrong.
The correct fix is to always convert using C locale.

Francois


More information about the vlc-devel mailing list