mirror of
https://github.com/mpv-player/mpv
synced 2025-02-28 19:30:44 +00:00
Don't deallocate font data if it will be used later.
It produced either segfault or "Error opening memory font" with any script that contains embedded fonts. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23282 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
fba7257f2d
commit
929e461eb0
@ -572,8 +572,10 @@ static int decode_font(ass_track_t* track)
|
||||
dsize = q - buf;
|
||||
assert(dsize <= size / 4 * 3 + 2);
|
||||
|
||||
if (track->library->extract_fonts)
|
||||
if (track->library->extract_fonts) {
|
||||
ass_add_font(track->library, track->parser_priv->fontname, (char*)buf, dsize);
|
||||
buf = 0;
|
||||
}
|
||||
|
||||
error_decode_font:
|
||||
if (buf) free(buf);
|
||||
|
Loading…
Reference in New Issue
Block a user