Commit 96d2593e authored by Akihiro Sagawa's avatar Akihiro Sagawa Committed by Alexandre Julliard

strmbase: Fix copy-paste error where calculating video destination height.

Spotted by Andrew Eikum. Signed-off-by: 's avatarAkihiro Sagawa <sagawa.aki@gmail.com> Signed-off-by: 's avatarAndrew Eikum <aeikum@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 97405fc8
...@@ -215,7 +215,7 @@ static void test_basic_video(void) ...@@ -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); ok(width==video_width/3+1, "expected %d, got %d\n", video_width/3+1, width);
hr = IBasicVideo_get_DestinationHeight(pbv, &height); hr = IBasicVideo_get_DestinationHeight(pbv, &height);
ok(hr==S_OK, "Cannot get destination height returned: %x\n", hr); 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); hr = IBasicVideo_put_DestinationLeft(pbv, video_width/3);
ok(hr==S_OK, "Cannot put destination left returned: %x\n", hr); ok(hr==S_OK, "Cannot put destination left returned: %x\n", hr);
...@@ -243,7 +243,7 @@ static void test_basic_video(void) ...@@ -243,7 +243,7 @@ static void test_basic_video(void)
hr = IBasicVideo_GetDestinationPosition(pbv, &left, &top, &width, &height); hr = IBasicVideo_GetDestinationPosition(pbv, &left, &top, &width, &height);
ok(hr == S_OK, "Cannot get source position returned: %x\n", hr); 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); 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 */ /* reset source rectangle */
hr = IBasicVideo_SetDefaultSourcePosition(pbv); hr = IBasicVideo_SetDefaultSourcePosition(pbv);
......
...@@ -368,7 +368,7 @@ HRESULT WINAPI BaseControlVideoImpl_put_DestinationHeight(IBasicVideo *iface, LO ...@@ -368,7 +368,7 @@ HRESULT WINAPI BaseControlVideoImpl_put_DestinationHeight(IBasicVideo *iface, LO
TRACE("(%p/%p)->(%d)\n", This, iface, DestinationHeight); TRACE("(%p/%p)->(%d)\n", This, iface, DestinationHeight);
This->pFuncsTable->pfnGetTargetRect(This, &DestRect); This->pFuncsTable->pfnGetTargetRect(This, &DestRect);
DestRect.right = DestRect.left + DestinationHeight; DestRect.bottom = DestRect.top + DestinationHeight;
This->pFuncsTable->pfnSetTargetRect(This, &DestRect); This->pFuncsTable->pfnSetTargetRect(This, &DestRect);
return S_OK; return S_OK;
...@@ -383,7 +383,7 @@ HRESULT WINAPI BaseControlVideoImpl_get_DestinationHeight(IBasicVideo *iface, LO ...@@ -383,7 +383,7 @@ HRESULT WINAPI BaseControlVideoImpl_get_DestinationHeight(IBasicVideo *iface, LO
if (!pDestinationHeight) if (!pDestinationHeight)
return E_POINTER; return E_POINTER;
This->pFuncsTable->pfnGetTargetRect(This, &DestRect); This->pFuncsTable->pfnGetTargetRect(This, &DestRect);
*pDestinationHeight = DestRect.right - DestRect.left; *pDestinationHeight = DestRect.bottom - DestRect.top;
return S_OK; return S_OK;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment