Commit bb968216 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Simplify

parent b2167185
......@@ -215,18 +215,12 @@ static int OpenDecoder( vlc_object_t *p_this )
if (psz_charset == NULL)
{
psz_charset = strdup ("UTF-8");
msg_Dbg (p_dec, "trying hard-coded character encoding: %s",
psz_charset ? psz_charset : "error");
msg_Dbg (p_dec, "using UTF-8 character encoding" );
}
/* Fifth, fail */
if (psz_charset == NULL)
{
free (p_sys);
return VLC_ENOMEM;
}
if (strcasecmp (psz_charset, "UTF-8") && strcasecmp (psz_charset, "utf8"))
if ((psz_charset != NULL)
&& strcasecmp (psz_charset, "UTF-8")
&& strcasecmp (psz_charset, "utf8"))
{
p_sys->iconv_handle = vlc_iconv_open ("UTF-8", psz_charset);
if (p_sys->iconv_handle == (vlc_iconv_t)(-1))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment