Commit 6404ab8a authored by Ludovic Fauvet's avatar Ludovic Fauvet Committed by Jean-Baptiste Kempf
Browse files

freetype: fallback to the system font if no font is specified in the style (fix #8960)



This fixes a potential NULL pointer dereference and also enables the marq
filter to use the user specified font.
Reported-by: default avatarTillmann Karras <tillmann@selfnet.de>
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent ab96d0c7
...@@ -2674,7 +2674,8 @@ static int RenderCommon( filter_t *p_filter, subpicture_region_t *p_region_out, ...@@ -2674,7 +2674,8 @@ static int RenderCommon( filter_t *p_filter, subpicture_region_t *p_region_out,
{ {
text_style_t *p_style; text_style_t *p_style;
if( p_region_in->p_style ) if( p_region_in->p_style )
p_style = CreateStyle( p_region_in->p_style->psz_fontname, p_style = CreateStyle( p_region_in->p_style->psz_fontname ? p_region_in->p_style->psz_fontname
: p_sys->psz_fontfamily,
p_region_in->p_style->i_font_size > 0 ? p_region_in->p_style->i_font_size p_region_in->p_style->i_font_size > 0 ? p_region_in->p_style->i_font_size
: p_sys->i_font_size, : p_sys->i_font_size,
(p_region_in->p_style->i_font_color & 0xffffff) | (p_region_in->p_style->i_font_color & 0xffffff) |
......
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