X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fh.263%2Fswfvideo.c;h=05a1df80ecfcf1557a940071a245aa127bffdac9;hb=50c757db52590bc2e187d2728271346b34677217;hp=4c5983d1fb3e6de071f0535abe31468c0bf2bc41;hpb=ea7b8b50792baaff58933612b4632e61731ddf87;p=swftools.git diff --git a/lib/h.263/swfvideo.c b/lib/h.263/swfvideo.c index 4c5983d..05a1df8 100644 --- a/lib/h.263/swfvideo.c +++ b/lib/h.263/swfvideo.c @@ -37,13 +37,6 @@ U16 totalframes = 0; #endif void swf_SetVideoStreamDefine(TAG*tag, VIDEOSTREAM*stream, U16 frames, U16 width, U16 height) { - swf_SetU16(tag, frames); - swf_SetU16(tag, width); - swf_SetU16(tag, height); - //swf_SetU8(tag, 1); /* smoothing on */ - swf_SetU8(tag, 0); /* smoothing off */ - swf_SetU8(tag, 2); /* codec = h.263 sorenson spark */ - #ifdef MAIN totalframes = frames; #endif @@ -71,6 +64,14 @@ void swf_SetVideoStreamDefine(TAG*tag, VIDEOSTREAM*stream, U16 frames, U16 width assert((stream->height&15) == 0); assert((stream->bbx*16) == stream->width); assert((stream->bby*16) == stream->height); + + swf_SetU16(tag, frames); + swf_SetU16(tag, width); + swf_SetU16(tag, height); + //swf_SetU8(tag, 1); /* smoothing on */ + swf_SetU8(tag, 0); /* smoothing off */ + swf_SetU8(tag, 2); /* codec = h.263 sorenson spark */ + } void swf_VideoStreamClear(VIDEOSTREAM*stream) { @@ -1243,11 +1244,11 @@ void swf_SetVideoStreamBlackFrame(TAG*tag, VIDEOSTREAM*s) { int bx, by; int quant = 31; + int x,y; s->quant = quant; writeHeader(tag, s->width, s->height, s->frame, quant, TYPE_IFRAME); - int x,y; for(y=0;yheight;y++) for(x=0;xwidth;x++) { s->current[y*s->width+x].y = 0;