Commit a02c06ff authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Freetype: fix regression

Caused by [231a9671]
Sorry for the disturbance
parent 32334346
...@@ -347,6 +347,7 @@ static int Create( vlc_object_t *p_this ) ...@@ -347,6 +347,7 @@ static int Create( vlc_object_t *p_this )
msg_Err( p_filter,"User didn't specify fontfile, using %s", psz_fontfamily); msg_Err( p_filter,"User didn't specify fontfile, using %s", psz_fontfamily);
#endif #endif
} }
p_sys->psz_fontfamily = psz_fontfamily;
/* Set the font file */ /* Set the font file */
#ifdef HAVE_FONTCONFIG #ifdef HAVE_FONTCONFIG
...@@ -356,11 +357,11 @@ static int Create( vlc_object_t *p_this ) ...@@ -356,11 +357,11 @@ static int Create( vlc_object_t *p_this )
psz_fontfile = FontConfig_Select( NULL, psz_fontfamily, false, false, psz_fontfile = FontConfig_Select( NULL, psz_fontfamily, false, false,
p_sys->i_default_font_size, &fontindex ); p_sys->i_default_font_size, &fontindex );
p_sys->psz_fontfamily = psz_fontfamily;
msg_Dbg( p_filter, "Using %s as font from file %s", psz_fontfamily, psz_fontfile ); msg_Dbg( p_filter, "Using %s as font from file %s", psz_fontfamily, psz_fontfile );
if( !psz_fontfile ) if( !psz_fontfile )
#else
psz_fontfile = psz_fontfamily; psz_fontfile = psz_fontfamily;
#else
psz_fontfile = psz_fontfamily;
#endif #endif
/* */ /* */
...@@ -409,7 +410,6 @@ static int Create( vlc_object_t *p_this ) ...@@ -409,7 +410,6 @@ static int Create( vlc_object_t *p_this )
p_filter->pf_render_html = NULL; p_filter->pf_render_html = NULL;
#endif #endif
free( psz_fontfamily );
LoadFontsFromAttachments( p_filter ); LoadFontsFromAttachments( p_filter );
return VLC_SUCCESS; return VLC_SUCCESS;
...@@ -444,8 +444,8 @@ static void Destroy( vlc_object_t *p_this ) ...@@ -444,8 +444,8 @@ static void Destroy( vlc_object_t *p_this )
#ifdef HAVE_STYLES #ifdef HAVE_STYLES
if( p_sys->p_xml ) xml_ReaderDelete( p_sys->p_xml ); if( p_sys->p_xml ) xml_ReaderDelete( p_sys->p_xml );
free( p_sys->psz_fontfamily );
#endif #endif
free( p_sys->psz_fontfamily );
/* FcFini asserts calling the subfunction FcCacheFini() /* FcFini asserts calling the subfunction FcCacheFini()
* even if no other library functions have been made since FcInit(), * even if no other library functions have been made since FcInit(),
......
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