comparison libass/ass_fontconfig.c @ 28941:a038ab949e7e

Fix uninitialized memory access in ass_fontconfig. This fixes hangups with plaintext subtitles happening when the first subtitle is about to be displayed.
author eugeni
date Mon, 16 Mar 2009 19:26:19 +0000
parents 5e03bb996d31
children 39006a122466
comparison
equal deleted inserted replaced
28940:7406e7f30d4e 28941:a038ab949e7e
158 158
159 if (curf >= fset->nfont) 159 if (curf >= fset->nfont)
160 goto error; 160 goto error;
161 161
162 #if (FC_VERSION >= 20297) 162 #if (FC_VERSION >= 20297)
163 if (!treat_family_as_pattern) {
163 // Remove all extra family names from original pattern. 164 // Remove all extra family names from original pattern.
164 // After this, FcFontRenderPrepare will select the most relevant family 165 // After this, FcFontRenderPrepare will select the most relevant family
165 // name in case there are more than one of them. 166 // name in case there are more than one of them.
166 for (; family_cnt > 1; --family_cnt) 167 for (; family_cnt > 1; --family_cnt)
167 FcPatternRemove(pat, FC_FAMILY, family_cnt - 1); 168 FcPatternRemove(pat, FC_FAMILY, family_cnt - 1);
169 }
168 #endif 170 #endif
169 171
170 rpat = FcFontRenderPrepare(priv->config, pat, fset->fonts[curf]); 172 rpat = FcFontRenderPrepare(priv->config, pat, fset->fonts[curf]);
171 if (!rpat) 173 if (!rpat)
172 goto error; 174 goto error;