# HG changeset patch # User kmkaplan # Date 1010683260 0 # Node ID 9e581ab5e54b1d84b8040f5cefb969aa1b4002ba # Parent 47bcafe1442ed338c7dbb42ddd27237c7144f6c6 Add vobsub support, suppress conditionnal on USE_DVDREAD. DVD and VobSub subtitles are displayed even if fonts can't be loaded. diff -r 47bcafe1442e -r 9e581ab5e54b libvo/sub.c --- a/libvo/sub.c Thu Jan 10 17:20:27 2002 +0000 +++ b/libvo/sub.c Thu Jan 10 17:21:00 2002 +0000 @@ -273,11 +273,13 @@ } 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 @@ 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 @@ 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 }