[Mplayer-cvslog] CVS: main/TOOLS/subfont-c subfont.c,1.11,1.12
Arpi of Ize
arpi at mplayerhq.hu
Thu May 2 03:56:34 CEST 2002
Update of /cvsroot/mplayer/main/TOOLS/subfont-c
In directory mail:/var/tmp.root/cvs-serv599
Modified Files:
subfont.c
Log Message:
.raw width>=65536 support by Georgi Georgiev <chutz at chubaka.homeip.net>
Index: subfont.c
===================================================================
RCS file: /cvsroot/mplayer/main/TOOLS/subfont-c/subfont.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- subfont.c 3 Mar 2002 19:18:42 -0000 1.11
+++ subfont.c 2 May 2002 01:56:28 -0000 1.12
@@ -111,7 +111,15 @@
static unsigned char header[800] = "mhwanh";
int i;
header[7] = 4;
+ if (width < 0x10000) { // are two bytes enough for the width?
header[8] = width>>8; header[9] = (unsigned char)width;
+ } else { // store width using 4 bytes at the end of the header
+ header[8] = header[9] = 0;
+ header[28] = (width >> 030) & 0xFF;
+ header[29] = (width >> 020) & 0xFF;
+ header[30] = (width >> 010) & 0xFF;
+ header[31] = (width ) & 0xFF;
+ }
header[10] = height>>8; header[11] = (unsigned char)height;
header[12] = colors>>8; header[13] = (unsigned char)colors;
for (i = 32; i<800; ++i) header[i] = (i-32)/3;
More information about the MPlayer-cvslog
mailing list