diff options
author | wm4 <wm4@nowhere> | 2020-05-13 20:07:59 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2020-05-13 20:07:59 +0200 |
commit | baabd5fce33d4f85de30477e1aa60b2fc6c02abd (patch) | |
tree | 59d64c1d346303df2c236d3063e8ca77ddd09a4a /sub/osd.c | |
parent | 6d8b3f9333892e5bc282438995d457f1e05b0498 (diff) | |
download | mpv-baabd5fce33d4f85de30477e1aa60b2fc6c02abd.tar.bz2 mpv-baabd5fce33d4f85de30477e1aa60b2fc6c02abd.tar.xz |
draw_bmp: use command line options for any used scalers
Diffstat (limited to 'sub/osd.c')
-rw-r--r-- | sub/osd.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -196,7 +196,15 @@ bool osd_get_render_subs_in_filter(struct osd_state *osd) void osd_set_render_subs_in_filter(struct osd_state *osd, bool s) { pthread_mutex_lock(&osd->lock); - osd->render_subs_in_filter = s; + if (osd->render_subs_in_filter != s) { + osd->render_subs_in_filter = s; + + int change_id = 0; + for (int n = 0; n < MAX_OSD_PARTS; n++) + change_id = MPMAX(change_id, osd->objs[n]->vo_change_id); + for (int n = 0; n < MAX_OSD_PARTS; n++) + osd->objs[n]->vo_change_id = change_id + 1; + } pthread_mutex_unlock(&osd->lock); } @@ -426,7 +434,7 @@ void osd_draw_on_image_p(struct osd_state *osd, struct mp_osd_res res, pthread_mutex_lock(&osd->lock); if (!osd->draw_cache) - osd->draw_cache = mp_draw_sub_alloc(osd); + osd->draw_cache = mp_draw_sub_alloc(osd, osd->global); stats_time_start(osd->stats, "draw-bmp"); |