[Mplayer-cvslog] CVS: main/libvo sub.c,1.74,1.75

Sascha Sommer CVS syncmail at mplayerhq.hu
Wed Sep 15 15:16:55 CEST 2004


CVS change done by Sascha Sommer CVS

Update of /cvsroot/mplayer/main/libvo
In directory mail:/var2/tmp/cvs-serv3763/libvo

Modified Files:
	sub.c 
Log Message:
This time is a patch to improve subtitle alignment management. It 
implements
SSA alignment styles; note that alignment for SSA files is not actually
supported, but for SAMI files (which use the same alignment codes) it 
is.
patch by Salvatore Falco <sfalco at studenti.ing.uniroma1.it> 


Index: sub.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/sub.c,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -r1.74 -r1.75
--- sub.c	11 Jul 2004 12:45:59 -0000	1.74
+++ sub.c	15 Sep 2004 13:16:52 -0000	1.75
@@ -653,16 +653,23 @@
 
     y = obj->y;
     
+    obj->alignment = 0;
     switch(vo_sub->alignment) {
-	case SUB_ALIGNMENT_HLEFT:
+       case SUB_ALIGNMENT_BOTTOMLEFT:
+       case SUB_ALIGNMENT_MIDDLELEFT:
+       case SUB_ALIGNMENT_TOPLEFT:
 	    obj->alignment |= 0x1;
 	    break;
-	case SUB_ALIGNMENT_HCENTER:
-	    obj->alignment |= 0x0;
+       case SUB_ALIGNMENT_BOTTOMRIGHT:
+       case SUB_ALIGNMENT_MIDDLERIGHT:
+       case SUB_ALIGNMENT_TOPRIGHT:
+	    obj->alignment |= 0x2;
 	    break;
-	case SUB_ALIGNMENT_HRIGHT:
+       case SUB_ALIGNMENT_BOTTOMCENTER:
+       case SUB_ALIGNMENT_MIDDLECENTER:
+       case SUB_ALIGNMENT_TOPCENTER:
 	default:
-	    obj->alignment |= 0x2;
+	    obj->alignment |= 0x0;
     }
 
     i=j=0;




More information about the MPlayer-cvslog mailing list