mirror of
https://github.com/mpv-player/mpv
synced 2025-02-14 19:07:14 +00:00
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
This commit is contained in:
parent
b397b28b31
commit
bc1d60dcb7
@ -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]);
|
||||
|
Loading…
Reference in New Issue
Block a user