mirror of
https://github.com/mpv-player/mpv
synced 2025-02-16 04:07:08 +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;
|
goto error;
|
||||||
|
|
||||||
#if (FC_VERSION >= 20297)
|
#if (FC_VERSION >= 20297)
|
||||||
|
if (!treat_family_as_pattern) {
|
||||||
// Remove all extra family names from original pattern.
|
// Remove all extra family names from original pattern.
|
||||||
// After this, FcFontRenderPrepare will select the most relevant family
|
// After this, FcFontRenderPrepare will select the most relevant family
|
||||||
// name in case there are more than one of them.
|
// name in case there are more than one of them.
|
||||||
for (; family_cnt > 1; --family_cnt)
|
for (; family_cnt > 1; --family_cnt)
|
||||||
FcPatternRemove(pat, FC_FAMILY, family_cnt - 1);
|
FcPatternRemove(pat, FC_FAMILY, family_cnt - 1);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
rpat = FcFontRenderPrepare(priv->config, pat, fset->fonts[curf]);
|
rpat = FcFontRenderPrepare(priv->config, pat, fset->fonts[curf]);
|
||||||
|
Loading…
Reference in New Issue
Block a user