[vlc-devel] [PATCH] libass: set windows/fonts as default directory

Christophe Mutricy xtophe at chewa.net
Wed Jan 7 14:36:44 CET 2009


2009/1/7 Hannes Domani <ssbssa at yahoo.de>:
> Hello
>
> this fixes the problem when font is not attached in mkv.
     free( psz_font_dir );
> +#else
> +    char psz_font_dir[MAX_PATH];
> +    GetSystemWindowsDirectoryA( psz_font_dir, sizeof(psz_font_dir) );

What about GetSystemWindowsDirectoryA( psz_font_dir, MAX_PATH 0; even
if every compiler should optimize that quite easely

> +    strcat( psz_font_dir, "/fonts" );

strncat here would be more prudent.

> +    ass_set_fonts_dir( p_library, psz_font_dir );
> +#endif


-- 
Xtophe



More information about the vlc-devel mailing list