Module: wine Branch: master Commit: 96d2593ead88f834d69405c97ca1c206cc0edf96 URL: http://source.winehq.org/git/wine.git/?a=commit;h=96d2593ead88f834d69405c97c...
Author: Akihiro Sagawa sagawa.aki@gmail.com Date: Fri Nov 25 01:10:03 2016 +0900
strmbase: Fix copy-paste error where calculating video destination height.
Spotted by Andrew Eikum.
Signed-off-by: Akihiro Sagawa sagawa.aki@gmail.com Signed-off-by: Andrew Eikum aeikum@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/quartz/tests/filtergraph.c | 4 ++-- dlls/strmbase/video.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c index fa11d3f..307bba9 100644 --- a/dlls/quartz/tests/filtergraph.c +++ b/dlls/quartz/tests/filtergraph.c @@ -215,7 +215,7 @@ static void test_basic_video(void) ok(width==video_width/3+1, "expected %d, got %d\n", video_width/3+1, width); hr = IBasicVideo_get_DestinationHeight(pbv, &height); ok(hr==S_OK, "Cannot get destination height returned: %x\n", hr); - todo_wine ok(height==video_height/3+1, "expected %d, got %d\n", video_height/3+1, height); + ok(height==video_height/3+1, "expected %d, got %d\n", video_height/3+1, height);
hr = IBasicVideo_put_DestinationLeft(pbv, video_width/3); ok(hr==S_OK, "Cannot put destination left returned: %x\n", hr); @@ -243,7 +243,7 @@ static void test_basic_video(void) hr = IBasicVideo_GetDestinationPosition(pbv, &left, &top, &width, &height); ok(hr == S_OK, "Cannot get source position returned: %x\n", hr); ok(top == video_height/3, "expected %d, got %d\n", video_height/3, top); - todo_wine ok(height == video_height/4+1, "expected %d, got %d\n", video_height/4+1, height); + ok(height == video_height/4+1, "expected %d, got %d\n", video_height/4+1, height);
/* reset source rectangle */ hr = IBasicVideo_SetDefaultSourcePosition(pbv); diff --git a/dlls/strmbase/video.c b/dlls/strmbase/video.c index be65886..1b8e3f3 100644 --- a/dlls/strmbase/video.c +++ b/dlls/strmbase/video.c @@ -368,7 +368,7 @@ HRESULT WINAPI BaseControlVideoImpl_put_DestinationHeight(IBasicVideo *iface, LO
TRACE("(%p/%p)->(%d)\n", This, iface, DestinationHeight); This->pFuncsTable->pfnGetTargetRect(This, &DestRect); - DestRect.right = DestRect.left + DestinationHeight; + DestRect.bottom = DestRect.top + DestinationHeight; This->pFuncsTable->pfnSetTargetRect(This, &DestRect);
return S_OK; @@ -383,7 +383,7 @@ HRESULT WINAPI BaseControlVideoImpl_get_DestinationHeight(IBasicVideo *iface, LO if (!pDestinationHeight) return E_POINTER; This->pFuncsTable->pfnGetTargetRect(This, &DestRect); - *pDestinationHeight = DestRect.right - DestRect.left; + *pDestinationHeight = DestRect.bottom - DestRect.top;
return S_OK; }