diff options
author | wm4 <wm4@nowhere> | 2012-09-28 21:19:36 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-10-16 07:26:28 +0200 |
commit | ffb7a2fe17af204635db6694b5b49b6368be91e6 (patch) | |
tree | 2aa0814e4cf37443bb01b50a23c19b28547a99f1 /libvo/vo_corevideo.m | |
parent | 65ea69f56476aabb0755ae80b7dc565df23ab426 (diff) | |
download | mpv-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 'libvo/vo_corevideo.m')
-rw-r--r-- | libvo/vo_corevideo.m | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libvo/vo_corevideo.m b/libvo/vo_corevideo.m index 1d10330bcb..fd667acb61 100644 --- a/libvo/vo_corevideo.m +++ b/libvo/vo_corevideo.m @@ -45,11 +45,10 @@ struct quad { }; #define CV_VERTICES_PER_QUAD 6 -#define CV_MAX_OSD_PARTS 20 struct osd_p { - GLuint tex[CV_MAX_OSD_PARTS]; - NSRect tex_rect[CV_MAX_OSD_PARTS]; + GLuint tex[MAX_OSD_PARTS]; + NSRect tex_rect[MAX_OSD_PARTS]; int tex_cnt; }; @@ -185,7 +184,7 @@ static void create_osd_texture(void *ctx, int x0, int y0, int w, int h, return; } - if (osd->tex_cnt >= CV_MAX_OSD_PARTS) { + if (osd->tex_cnt >= MAX_OSD_PARTS) { mp_msg(MSGT_VO, MSGL_ERR, "Too many OSD parts, contact the" " developers!\n"); return; |