Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Ole Wund <bjornmose@gmx.net>2006-05-17 15:31:12 +0400
committerJens Ole Wund <bjornmose@gmx.net>2006-05-17 15:31:12 +0400
commit922cc48f15f52a60bc46571cf2956035a076e6be (patch)
treee353fcc0f0c1dda6a3353e6baae866e5cfa6d9ee /source/blender/src/writeavicodec.c
parent3417378a3a3d2837fb3b721cd778734c145c01cd (diff)
#4201 the second
humm .. a bit more testing showed AVI codecs want it 2 byte aligned found nothing in MSDN Library about that
Diffstat (limited to 'source/blender/src/writeavicodec.c')
-rw-r--r--source/blender/src/writeavicodec.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/src/writeavicodec.c b/source/blender/src/writeavicodec.c
index cfcb9f0f6a7..6ee42d7807a 100644
--- a/source/blender/src/writeavicodec.c
+++ b/source/blender/src/writeavicodec.c
@@ -738,17 +738,17 @@ void append_avi_codec(int frame,int *pixels,int rectx, int recty)
HRESULT hr;
BITMAPINFOHEADER bmi;
RGBTRIPLE *buffer, *to;
- int x, y ,pad;
+ int x, y ,pad, align =2;
unsigned char *from;
if (psCompressed) {
// initialize the BITMAPINFOHEADER
init_bmi(&bmi, rectx, recty);
- //windows wants bitmap rows 4 byte aligned
- pad = (rectx*3) - 4*((rectx*3)/4);
+ //windows wants bitmap rows aligned
+ pad = (rectx*3) - align*((rectx*3)/align);
if (pad) {
- pad = 4 - pad;
+ pad = align - pad;
}
// copy pixels