#define __ABS( x ) ( (x) < 0 ? (-(x)) : (x) )
+static char *FromACP( const char *str )
+{
+ return FromCharset(vlc_pgettext("GetACP", "CP1252"), str, strlen(str));
+}
+
typedef struct
{
vlc_fourcc_t i_fourcc;
continue;
}
if( p_strn )
- fmt.psz_description = FromLatin1( p_strn->p_str );
+ fmt.psz_description = FromACP( p_strn->p_str );
if( tk->p_out_muxed == NULL )
tk->p_es = es_out_Add( p_demux->out, &fmt );
TAB_APPEND( p_sys->i_track, p_sys->track, tk );
avi_chunk_STRING_t *p_strz = AVI_ChunkFind( p_info, p_dsc[i].i_id, 0 );
if( !p_strz )
continue;
- char *psz_value = FromLatin1( p_strz->p_str );
+ char *psz_value = FromACP( p_strz->p_str );
if( !psz_value )
continue;
i_size -= 6;
if( !psz_description )
- psz_description = p_strn ? FromLatin1( p_strn->p_str ) : NULL;
+ psz_description = p_strn ? FromACP( p_strn->p_str ) : NULL;
char *psz_name;
if( asprintf( &psz_name, "subtitle%d.srt", p_sys->i_attachment ) <= 0 )
psz_name = NULL;