From 93e78ef02b9918ccfa86f0e4d446e503cbec1fe1 Mon Sep 17 00:00:00 2001 From: kramm Date: Thu, 6 Jun 2002 11:38:09 +0000 Subject: [PATCH] implement header rewriting for -X, -Y, -r. --- src/swfcombine.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/swfcombine.c b/src/swfcombine.c index 131f2b5..ce578af 100644 --- a/src/swfcombine.c +++ b/src/swfcombine.c @@ -720,6 +720,20 @@ TAG* write_master(TAG*tag, SWF*master, SWF*slave, int spriteid, int replaceddefi return tag; } +void adjustheader(SWF*swf) +{ + if(config.framerate) + swf->frameRate = config.framerate; + if(config.hassizex) { + swf->movieSize.xmax = + swf->movieSize.xmin + config.sizex; + } + if(config.hassizey) { + swf->movieSize.ymax = + swf->movieSize.ymin + config.sizey; + } +} + void catcombine(SWF*master, char*slave_name, SWF*slave, SWF*newswf) { char* depths; @@ -746,6 +760,8 @@ void catcombine(SWF*master, char*slave_name, SWF*slave, SWF*newswf) jpeg_assert(master, slave); memcpy(newswf, master, sizeof(SWF)); + adjustheader(newswf); + tag = newswf->firstTag = swf_InsertTag(0, ST_REFLEX); // to be removed later depths = malloc(65536); @@ -877,6 +893,8 @@ void normalcombine(SWF*master, char*slave_name, SWF*slave, SWF*newswf) // write file memcpy(newswf, master, sizeof(SWF)); + adjustheader(newswf); + newswf->firstTag = tag = swf_InsertTag(0, ST_REFLEX); // to be removed later if (config.antistream) { -- 1.7.10.4