diff options
author | wm4 <wm4@nowhere> | 2012-08-07 19:21:46 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-08-07 19:21:46 +0200 |
commit | fb563de2550858f9ae6cdb239d44a415e5e91135 (patch) | |
tree | 53d87a7af290a1a40b33d70c060d4137114fd0d2 /sub/sub.c | |
parent | 762ef8d53238160d5fc8873c249d11d38399bf94 (diff) | |
download | mpv-fb563de2550858f9ae6cdb239d44a415e5e91135.tar.bz2 mpv-fb563de2550858f9ae6cdb239d44a415e5e91135.tar.xz |
sub: fix confusion of ass_library handles
Commit 7484ae8e2ee5327 attempted to introduce two ass_library handles
(as it was needed to deal with how ass_library manages fonts), but the
commit was completely bogus: it assumed osd_state->ass_library would be
used by osd_libass.c only, which is not the case. As result, some of the
subtitle code used the wrong ass_library handle.
We need two ass_library handles in osd_state. The one from the mplayer
core for subtitles (osd_state->ass_library), and one for OSD rendering
(osd_state->osd_ass_library).
Diffstat (limited to 'sub/sub.c')
-rw-r--r-- | sub/sub.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -304,11 +304,12 @@ int osd_update(struct osd_state *osd, int dxs, int dys) return osd_update_ext(osd, dxs, dys, 0, 0, 0, 0, dxs, dys); } -struct osd_state *osd_create(struct MPOpts *opts) +struct osd_state *osd_create(struct MPOpts *opts, struct ass_library *asslib) { struct osd_state *osd = talloc_zero(NULL, struct osd_state); *osd = (struct osd_state){ .opts = opts, + .ass_library = asslib, }; if(!draw_alpha_init_flag){ draw_alpha_init_flag=1; |