From 3846fc758789711347c0b11f87736b27fc6210a0 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 21 Dec 2013 19:06:37 +0100 Subject: sub/osd: mp_msg conversions --- player/core.h | 1 + player/loadfile.c | 6 ++++-- player/main.c | 5 +++-- player/sub.c | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) (limited to 'player') diff --git a/player/core.h b/player/core.h index a344b92ac3..9fe52b690b 100644 --- a/player/core.h +++ b/player/core.h @@ -313,6 +313,7 @@ typedef struct MPContext { */ struct ass_renderer *ass_renderer; struct ass_library *ass_library; + struct mp_log *ass_log; int last_dvb_step; diff --git a/player/loadfile.c b/player/loadfile.c index 1bee60119a..8ca793941f 100644 --- a/player/loadfile.c +++ b/player/loadfile.c @@ -842,8 +842,10 @@ static void init_sub_renderer(struct MPContext *mpctx) assert(!mpctx->ass_renderer); mpctx->ass_renderer = ass_renderer_init(mpctx->ass_library); - if (mpctx->ass_renderer) - mp_ass_configure_fonts(mpctx->ass_renderer, mpctx->opts->sub_text_style); + if (mpctx->ass_renderer) { + mp_ass_configure_fonts(mpctx->ass_renderer, mpctx->opts->sub_text_style, + mpctx->global, mpctx->ass_log); + } mpctx->initialized_flags |= INITIALIZED_LIBASS; #endif } diff --git a/player/main.c b/player/main.c index 0cf0a1a447..7ca64ed664 100644 --- a/player/main.c +++ b/player/main.c @@ -399,13 +399,14 @@ static int mpv_main(int argc, char *argv[]) getch2_enable(); #if HAVE_LIBASS - mpctx->ass_library = mp_ass_init(opts); + mpctx->ass_log = mp_log_new(mpctx, mpctx->global->log, "!libass"); + mpctx->ass_library = mp_ass_init(mpctx->global, mpctx->ass_log); #else MP_WARN(mpctx, "Compiled without libass.\n"); MP_WARN(mpctx, "There will be no OSD and no text subtitles.\n"); #endif - mpctx->osd = osd_create(opts); + mpctx->osd = osd_create(mpctx->global); if (opts->force_vo) { opts->fixed_vo = 1; diff --git a/player/sub.c b/player/sub.c index ceef81b319..ba8f7d70eb 100644 --- a/player/sub.c +++ b/player/sub.c @@ -185,7 +185,7 @@ void reinit_subs(struct MPContext *mpctx) if (!sh->sub->dec_sub) { assert(!mpctx->d_sub); - sh->sub->dec_sub = sub_create(opts); + sh->sub->dec_sub = sub_create(mpctx->global); } assert(!mpctx->d_sub || sh->sub->dec_sub == mpctx->d_sub); -- cgit v1.2.3