diff options
author | 2002-01-10 17:21:00 +0000 | |
---|---|---|
committer | 2002-01-10 17:21:00 +0000 | |
commit | 4d08add9a213f77163320eecaa485d1007402d89 (patch) | |
tree | 32eacbe62c782d9fe818fe0f5f4ad128d09e71c2 /libvo/sub.c | |
parent | 1b6e300d94f1a8eaac02af6a1ea181535116f36f (diff) |
Add vobsub support, suppress conditionnal on USE_DVDREAD.
DVD and VobSub subtitles are displayed even if fonts can't be loaded.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4082 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/sub.c')
-rw-r--r-- | libvo/sub.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/libvo/sub.c b/libvo/sub.c index 30bfe2b3df..8fe826eb0d 100644 --- a/libvo/sub.c +++ b/libvo/sub.c @@ -273,11 +273,13 @@ inline static void vo_draw_text_sub(int dxs,int dys,void (*draw_alpha)(int x0,in } void *vo_spudec=NULL; -#ifdef USE_DVDREAD +void *vo_vobsub=NULL; inline static void vo_draw_spudec(int dxs,int dys,void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride)){ spudec_draw(vo_spudec, draw_alpha); } -#endif +inline static void vo_draw_vobsub(int dxs,int dys,void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride)){ + vobsub_draw(vo_vobsub, dxs, dys, draw_alpha); +} static int draw_alpha_init_flag=0; @@ -285,6 +287,14 @@ extern void vo_draw_alpha_init(); void vo_draw_text(int dxs,int dys,void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride)){ + if(vo_spudec){ + vo_draw_spudec(dxs,dys,draw_alpha); + } + + if(vo_vobsub){ + vo_draw_vobsub(dxs,dys,draw_alpha); + } + if(!vo_font) return; // no font if(!draw_alpha_init_flag){ @@ -303,11 +313,6 @@ void vo_draw_text(int dxs,int dys,void (*draw_alpha)(int x0,int y0, int w,int h, if(vo_osd_progbar_type>=0 && vo_font->font[OSD_PB_0]>=0){ vo_draw_text_progbar(dxs,dys,draw_alpha); } -#ifdef USE_DVDREAD - if(vo_spudec){ - vo_draw_spudec(dxs,dys,draw_alpha); - } -#endif } |