mf/evr: Set initial output window size for the presenter.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2021-04-19 16:02:01 +03:00 committed by Alexandre Julliard
parent da5248bcfa
commit 0dbbe8da25
2 changed files with 6 additions and 2 deletions

View File

@ -1,7 +1,7 @@
MODULE = mf.dll
IMPORTLIB = mf
IMPORTS = advapi32 mfplat ole32 uuid mfuuid strmiids
DELAYIMPORTS = evr
DELAYIMPORTS = evr user32
EXTRADLLFLAGS = -mno-cygwin -Wb,--prefer-native

View File

@ -1611,11 +1611,15 @@ static HRESULT video_renderer_configure_mixer(struct video_renderer *renderer)
static HRESULT video_renderer_configure_presenter(struct video_renderer *renderer)
{
IMFVideoDisplayControl *control;
RECT rect = { 0 };
HRESULT hr;
if (SUCCEEDED(IMFVideoPresenter_QueryInterface(renderer->presenter, &IID_IMFVideoDisplayControl, (void **)&control)))
{
IMFVideoDisplayControl_SetVideoWindow(control, renderer->window);
GetClientRect(renderer->window, &rect);
if (SUCCEEDED(hr = IMFVideoDisplayControl_SetVideoWindow(control, renderer->window)))
hr = IMFVideoDisplayControl_SetVideoPosition(control, NULL, &rect);
IMFVideoDisplayControl_Release(control);
}