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

win32text: fix encoding

This was broken ever since VLC was switched to UTF-8.
parent 20d2928e
......@@ -314,19 +314,9 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
if( !p_region_in->psz_text || !*p_region_in->psz_text )
return VLC_EGENERIC;
psz_string = malloc( (strlen( p_region_in->psz_text )+1) * sizeof(TCHAR) );
if( !psz_string )
return VLC_ENOMEM;
#ifdef UNICODE
if( mbstowcs( psz_string, p_region_in->psz_text,
strlen( p_region_in->psz_text ) * sizeof(TCHAR) ) < 0 )
{
free( psz_string );
psz_string = ToT(p_region_in->psz_text);
if( psz_string == NULL )
return VLC_EGENERIC;
}
#else
strcpy( psz_string, p_region_in->psz_text );
#endif
if( !*psz_string )
{
free( psz_string );
......
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