X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fjpeg2swf.c;h=7c23147d377ea0d5d7589b3d7d6a684e6666f090;hb=48d48fa9f1a7173381258b6e0f1765bc84c0a7a1;hp=16efc3c8dbb5d957e152afcb4cececb1070f8c3a;hpb=6bc6f6368354fb8d16e9a8fb005135a7ac5d16e8;p=swftools.git diff --git a/src/jpeg2swf.c b/src/jpeg2swf.c index 16efc3c..7c23147 100644 --- a/src/jpeg2swf.c +++ b/src/jpeg2swf.c @@ -211,7 +211,7 @@ TAG *MovieAddFrame(SWF * swf, TAG * t, char *sname, int quality, t = swf_InsertTag(t, ST_VIDEOFRAME); swf_SetU16(t, 0xf00d); quant = 1+(30-(30*quality)/100); - if(!(frame&127)) { + if(!(frame%20)) { swf_SetVideoStreamIFrame(t, &stream, pic2, quant); } else { swf_SetVideoStreamPFrame(t, &stream, pic2, quant); @@ -240,6 +240,8 @@ TAG *MovieAddFrame(SWF * swf, TAG * t, char *sname, int quality, swf_GetMatrix(NULL, &m); m.sx = 20 * 0x10000; m.sy = 20 * 0x10000; + m.tx = -10; + m.ty = -10; fs = swf_ShapeAddBitmapFillStyle(s, &m, id, 0); swf_SetU16(t, id + 1); // id r.xmin = r.ymin = 0; @@ -254,8 +256,10 @@ TAG *MovieAddFrame(SWF * swf, TAG * t, char *sname, int quality, swf_ShapeSetLine(t, s, 0, -r.ymax); swf_ShapeSetEnd(t); - t = swf_InsertTag(t, ST_REMOVEOBJECT2); - swf_SetU16(t, 1); // depth + if(frame) { + t = swf_InsertTag(t, ST_REMOVEOBJECT2); + swf_SetU16(t, 1); // depth + } t = swf_InsertTag(t, ST_PLACEOBJECT2); swf_GetMatrix(NULL, &m);