From: kramm Date: Sun, 26 Sep 2004 14:58:11 +0000 (+0000) Subject: fixed compile-time bug. X-Git-Tag: release-0-6-2~23 X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=commitdiff_plain;h=96b5b5dcc9e45af1782b0b9509691238a4f12cc3 fixed compile-time bug. --- diff --git a/avi2swf/videoreader_vfw.cc b/avi2swf/videoreader_vfw.cc index 2e0c787..124284a 100644 --- a/avi2swf/videoreader_vfw.cc +++ b/avi2swf/videoreader_vfw.cc @@ -62,7 +62,7 @@ static bool videoreader_vfw_eof(videoreader_t* vr) return (i->video_pos >= i->video_end); } -static int bitmap_to_rgba(BITMAPINFOHEADER*bi, void*buffer, const int dest_width, const int dest_height) +static int bitmap_to_rgba(BITMAPINFOHEADER*bi, void*buffer, const int dest_width, const int dest_height, int flip) { UCHAR*data = (UCHAR*)(bi+1); // actual bitmap data starts after the header @@ -89,9 +89,9 @@ static int bitmap_to_rgba(BITMAPINFOHEADER*bi, void*buffer, const int dest_width int linex = ((bytesperpixel/8)+3)&~3; memset(dest, 255, dest_width*dest_height*4);//pre-fill alpha channel - int starty = i->flip? 0 : dest_height-1; - int endy = i->flip? dest_height-1 : 0; - int yinc = i->flip? 1 : -1; + int starty = flip? 0 : dest_height-1; + int endy = flip? dest_height-1 : 0; + int yinc = flip? 1 : -1; if(bi->biBitCount==1) { UCHAR*img = data; @@ -175,7 +175,7 @@ static int videoreader_vfw_getimage(videoreader_t* vr, void*buffer) return 0; } - if(!bitmap_to_rgba(bi, buffer, i->width, i->height)) { + if(!bitmap_to_rgba(bi, buffer, i->width, i->height, i->flip)) { fprintf(stderr, "couldn't convert bitmap to RGBA.\n"); return 0; }