From: Eric Pouech epouech@codeweavers.com
This is actually fixing two issues: - if we get a negative stride, then the video transform should have already flipped vertically the image, so we don't need to flip it again. (This is another side effect for handling negative strides in wg_transform). - it also fixes a crash in AoEII, as the image source line offsets were incorrectly computed with unsigned arithmetic (while signed arithmetic was expected), resulting in incorrect sign propagation from 32bit to 64bit integers.
Signed-off-by: Eric Pouech epouech@codeweavers.com --- dlls/evr/evr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/dlls/evr/evr.c b/dlls/evr/evr.c index 26a2a3a1eb5..25785ea97ab 100644 --- a/dlls/evr/evr.c +++ b/dlls/evr/evr.c @@ -382,8 +382,7 @@ static HRESULT evr_copy_sample_buffer(struct evr *filter, IMediaSample *input_sa { if (SUCCEEDED(hr = IDirect3DSurface9_LockRect(surface, &locked_rect, NULL, D3DLOCK_DISCARD))) { - if (src_stride < 0) src -= src_stride * (lines - 1); - MFCopyImage(locked_rect.pBits, locked_rect.Pitch, src, src_stride, width * 4, lines); + MFCopyImage(locked_rect.pBits, locked_rect.Pitch, src, abs(src_stride), width * 4, lines); IDirect3DSurface9_UnlockRect(surface); }