[Mplayer-cvslog] CVS: main/libvo sub.c,1.38,1.39

Kim Minh Kaplan CVS kmkaplan at mplayer.dev.hu
Thu Jan 10 18:21:03 CET 2002


Update of /cvsroot/mplayer/main/libvo
In directory mplayer:/var/tmp.root/cvs-serv8523/libvo

Modified Files:
	sub.c 
Log Message:
Add vobsub support, suppress conditionnal on USE_DVDREAD.

DVD and VobSub subtitles are displayed even if fonts can't be loaded.


Index: sub.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/sub.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- sub.c	28 Nov 2001 12:44:39 -0000	1.38
+++ sub.c	10 Jan 2002 17:21:00 -0000	1.39
@@ -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
 
 }
          




More information about the MPlayer-cvslog mailing list