summaryrefslogtreecommitdiffstats
path: root/sub/dec_sub.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-09-28 21:19:36 +0200
committerwm4 <wm4@nowhere>2012-10-16 07:26:28 +0200
commitffb7a2fe17af204635db6694b5b49b6368be91e6 (patch)
tree2aa0814e4cf37443bb01b50a23c19b28547a99f1 /sub/dec_sub.c
parent65ea69f56476aabb0755ae80b7dc565df23ab426 (diff)
downloadmpv-ffb7a2fe17af204635db6694b5b49b6368be91e6.tar.bz2
mpv-ffb7a2fe17af204635db6694b5b49b6368be91e6.tar.xz
sub: create sub_bitmap array even when using libass
One sub_bitmaps struct could contain either a libass ASS_Image list, or a mplayer native list of sub-bitmaps. This caused code duplication in vo_vdpau.c and bitmap_packer.c. Avoid this by creating such a sub_bitmap array even with libass. This basically copies the list and recreates it in mplayer's native format. It gets rid of the code duplication, and will make implementing extended subtitle and OSD rendering in other VOs easier. Also do some cosmetic changes and other preparations for the following commits.
Diffstat (limited to 'sub/dec_sub.c')
-rw-r--r--sub/dec_sub.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sub/dec_sub.c b/sub/dec_sub.c
index 4a048b27a6..31b06b9b80 100644
--- a/sub/dec_sub.c
+++ b/sub/dec_sub.c
@@ -62,7 +62,8 @@ void sub_get_bitmaps(struct osd_state *osd, struct sub_bitmaps *res)
{
struct MPOpts *opts = osd->opts;
- *res = (struct sub_bitmaps){ .type = SUBBITMAP_EMPTY,
+ *res = (struct sub_bitmaps){ .render_index = 0,
+ .format = SUBBITMAP_EMPTY,
.bitmap_id = osd->bitmap_id,
.bitmap_pos_id = osd->bitmap_pos_id };
if (!opts->sub_visibility || !osd->sh_sub || !osd->sh_sub->active) {