[vlc-commits] freetype: fallback to the system font if no font is specified in the style ( fix #8960)
Ludovic Fauvet
git at videolan.org
Wed Aug 28 13:39:29 CEST 2013
vlc | branch: master | Ludovic Fauvet <etix at videolan.org> | Wed Aug 28 12:54:21 2013 +0200| [6404ab8ad659b21b0d4de16697b16feab7a8efc6] | committer: Jean-Baptiste Kempf
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: Tillmann Karras <tillmann at selfnet.de>
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6404ab8ad659b21b0d4de16697b16feab7a8efc6
---
modules/text_renderer/freetype.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules/text_renderer/freetype.c b/modules/text_renderer/freetype.c
index cdc9243..05fa2a2 100644
--- a/modules/text_renderer/freetype.c
+++ b/modules/text_renderer/freetype.c
@@ -2674,7 +2674,8 @@ static int RenderCommon( filter_t *p_filter, subpicture_region_t *p_region_out,
{
text_style_t *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_sys->i_font_size,
(p_region_in->p_style->i_font_color & 0xffffff) |
More information about the vlc-commits
mailing list