diff options
Diffstat (limited to 'sub/draw_bmp.c')
-rw-r--r-- | sub/draw_bmp.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/sub/draw_bmp.c b/sub/draw_bmp.c index 0c913c86fd..ba027838ec 100644 --- a/sub/draw_bmp.c +++ b/sub/draw_bmp.c @@ -494,11 +494,8 @@ static void chroma_down(struct mp_image *old_src, struct mp_image *temp) } } -// cache: if not NULL, the function will set *cache to a talloc-allocated cache -// containing scaled versions of sbs contents - free the cache with -// talloc_free() -void mp_draw_sub_bitmaps(struct mp_draw_sub_cache **cache, struct mp_image *dst, - struct sub_bitmaps *sbs) +static void draw_sbs(struct mp_draw_sub_cache **cache, struct mp_image *dst, + struct sub_bitmaps *sbs) { assert(mp_draw_sub_formats[sbs->format]); if (!mp_sws_supported_format(dst->imgfmt)) @@ -542,4 +539,14 @@ void mp_draw_sub_bitmaps(struct mp_draw_sub_cache **cache, struct mp_image *dst, } } +// cache: if not NULL, the function will set *cache to a talloc-allocated cache +// containing scaled versions of sbs contents - free the cache with +// talloc_free() +void mp_draw_sub_bitmaps(struct mp_draw_sub_cache **cache, struct mp_image *dst, + struct sub_bitmap_list *sbs_list) +{ + for (int n = 0; n < sbs_list->num_items; n++) + draw_sbs(cache, dst, sbs_list->items[n]); +} + // vim: ts=4 sw=4 et tw=80 |