From bc1d60dcb7585b3c6115ed590a073573f39638b4 Mon Sep 17 00:00:00 2001 From: eugeni Date: Mon, 16 Mar 2009 19:26:19 +0000 Subject: Fix uninitialized memory access in ass_fontconfig. This fixes hangups with plaintext subtitles happening when the first subtitle is about to be displayed. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28976 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libass/ass_fontconfig.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libass/ass_fontconfig.c b/libass/ass_fontconfig.c index d0042dcdfd..e8e759b4c7 100644 --- a/libass/ass_fontconfig.c +++ b/libass/ass_fontconfig.c @@ -160,11 +160,13 @@ static char* _select_font(fc_instance_t* priv, const char* family, int treat_fam goto error; #if (FC_VERSION >= 20297) + if (!treat_family_as_pattern) { // Remove all extra family names from original pattern. // After this, FcFontRenderPrepare will select the most relevant family // name in case there are more than one of them. for (; family_cnt > 1; --family_cnt) FcPatternRemove(pat, FC_FAMILY, family_cnt - 1); + } #endif rpat = FcFontRenderPrepare(priv->config, pat, fset->fonts[curf]); -- cgit v1.2.3