summaryrefslogtreecommitdiffstats
path: root/TOOLS
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-05-02 01:56:28 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-05-02 01:56:28 +0000
commit1ca2d5b055ed9b0e45b0f7e71b8833b66f222e49 (patch)
tree6999a1669f7ed83781a1cc66afa0db9abcd020df /TOOLS
parent2b96b208bf9c59dde029f25627997fa0db11a72f (diff)
downloadmpv-1ca2d5b055ed9b0e45b0f7e71b8833b66f222e49.tar.bz2
mpv-1ca2d5b055ed9b0e45b0f7e71b8833b66f222e49.tar.xz
.raw width>=65536 support by Georgi Georgiev <chutz@chubaka.homeip.net>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5929 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'TOOLS')
-rw-r--r--TOOLS/subfont-c/subfont.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/TOOLS/subfont-c/subfont.c b/TOOLS/subfont-c/subfont.c
index 15729fb38a..154eaffc3f 100644
--- a/TOOLS/subfont-c/subfont.c
+++ b/TOOLS/subfont-c/subfont.c
@@ -111,7 +111,15 @@ void write_header(FILE *f) {
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;