[Mplayer-cvslog] CVS: main/libvo vo_mpegpes.c,1.23,1.24

Arpi of Ize arpi at mplayer.dev.hu
Fri Mar 15 15:42:28 CET 2002


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

Modified Files:
	vo_mpegpes.c 
Log Message:
place subtitles under the image

Index: vo_mpegpes.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_mpegpes.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- vo_mpegpes.c	15 Mar 2002 03:49:17 -0000	1.23
+++ vo_mpegpes.c	15 Mar 2002 14:42:15 -0000	1.24
@@ -5,7 +5,7 @@
 #define QUALITY 90
 
 // #undef if you don't want mpeg1 transcoder (you'll be limited to mpeg1/2 playback only)
-//#define USE_LIBFAME
+#define USE_LIBFAME
 
 /* 
  * Based on:
@@ -203,12 +203,15 @@
       osd_w=params.width;
     } else s_pos_x=0;
 
-    osd_h=s_height;
     d_pos_y=(params.height-(int)s_height)/2;
     if(d_pos_y<0){
       s_pos_y=-d_pos_y;d_pos_y=0;
       osd_h=params.height;
-    } else s_pos_y=0;
+    } else {
+      s_pos_y=0;
+      osd_h=s_height+d_pos_y;
+      // if(d_pos_y) osd clear: s_height+d_pos_y .. params.height
+    }
 
     printf("[vo] position mapping: %d;%d => %d;%d\n",s_pos_x,s_pos_y,d_pos_x,d_pos_y);
 
@@ -254,6 +257,10 @@
 {
 #ifdef USE_LIBFAME
   if(picture_buf){ // YV12 only:
+  // if(d_pos_y) osd clear: s_height+d_pos_y .. params.height
+    if(d_pos_y){
+	memset(yuv.y+osd_h*yuv.w,0,(params.height-osd_h)*yuv.w);
+    }
     vo_draw_text(osd_w,osd_h,draw_alpha);
   }
 #endif




More information about the MPlayer-cvslog mailing list