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.h | |
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.h')
-rw-r--r-- | sub/sub.h | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -75,13 +75,15 @@ struct osd_state { bool ass_force_reload; int w, h; char *osd_text; - struct ass_renderer *osd_render; - struct font_desc *sub_font; struct ass_track *ass_track; double pts; double sub_offset; bool ass_track_changed; bool vsfilter_aspect; + + struct ass_renderer *osd_render; + struct ass_library *osd_ass_library; + struct MPOpts *opts; }; @@ -161,7 +163,7 @@ void osd_draw_text_ext(struct osd_state *osd, int dxs, int dys, int stride), void *ctx); -struct osd_state *osd_create(struct MPOpts *opts); +struct osd_state *osd_create(struct MPOpts *opts, struct ass_library *asslib); void osd_set_text(struct osd_state *osd, const char *text); int osd_update(struct osd_state *osd, int dxs, int dys); void vo_osd_changed(int new_value); |