diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index f2c3d93138c..d590a717033 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -255,7 +255,17 @@ static DWORD VMR9_SendSampleData(struct quartz_vmr *This, VMR9PresentationInfo * return hr; } - if (lock.Pitch != width * bmiHeader->biBitCount / 8) + if (height > 0) { + /* Bottom up image needs inverting */ + lock.pBits = (char *)lock.pBits + (height * lock.Pitch); + while (height--) + { + memcpy(lock.pBits, data, width * bmiHeader->biBitCount / 8); + data = data + width * bmiHeader->biBitCount / 8; + lock.pBits = (char *)lock.pBits - lock.Pitch; + } + } + else if (lock.Pitch != width * bmiHeader->biBitCount / 8) { WARN("Slow path! %u/%u\n", lock.Pitch, width * bmiHeader->biBitCount/8);