summaryrefslogtreecommitdiffstats
path: root/libass
diff options
context:
space:
mode:
authoreugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-01-29 17:08:29 +0000
committereugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-01-29 17:08:29 +0000
commit7c137f48c6850e5c4d188d81eab42b9fd0cb1f4a (patch)
tree9531120c163859954f6eeb9d3e60f13b2ae72f95 /libass
parent120df8df336e58acfc0e654e867646942a6351a9 (diff)
downloadmpv-7c137f48c6850e5c4d188d81eab42b9fd0cb1f4a.tar.bz2
mpv-7c137f48c6850e5c4d188d81eab42b9fd0cb1f4a.tar.xz
Bugfix: glyph and bitmap pointers could be left uninitialized after
get_glyph(). Based on a patch by Stanislav Maslovski (stanislav d maslovski a gmail d com). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22063 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libass')
-rw-r--r--libass/ass_render.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libass/ass_render.c b/libass/ass_render.c
index 6c8cd84825..ddb3df702a 100644
--- a/libass/ass_render.c
+++ b/libass/ass_render.c
@@ -1233,6 +1233,9 @@ static int get_glyph(int symbol, glyph_info_t* info, FT_Vector* advance)
// not found, get a new outline glyph from face
// mp_msg(MSGT_ASS, MSGL_INFO, "miss, index = %d, symbol = %c, adv = (%d, %d)\n", index, symbol, advance->x, advance->y);
+ info->outline_glyph = 0;
+ info->bm = info->bm_o = info->bm_s = 0;
+
info->glyph = ass_font_get_glyph(frame_context.ass_priv->fontconfig_priv, render_context.font, symbol);
if (!info->glyph)
return 0;
@@ -1246,12 +1249,8 @@ static int get_glyph(int symbol, glyph_info_t* info, FT_Vector* advance)
if (error) {
mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_FT_Glyph_Stroke_Error, error);
}
- } else {
- info->outline_glyph = 0;
}
- info->bm = info->bm_o = info->bm_s = 0;
-
return 0;
}