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

Alexandre Julliard julliard at winehq.org
Mon Apr 19 15:38:10 CDT 2021


Module: wine
Branch: master
Commit: 0dbbe8da25be1b828aa4babb89fc45a9de1aa9de
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=0dbbe8da25be1b828aa4babb89fc45a9de1aa9de

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Mon Apr 19 16:02:01 2021 +0300

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

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/mf/Makefile.in | 2 +-
 dlls/mf/evr.c       | 6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/dlls/mf/Makefile.in b/dlls/mf/Makefile.in
index f60e337b386..e56d4c04a84 100644
--- a/dlls/mf/Makefile.in
+++ b/dlls/mf/Makefile.in
@@ -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
 
diff --git a/dlls/mf/evr.c b/dlls/mf/evr.c
index 9cb6763da4e..79e2f57f9c5 100644
--- a/dlls/mf/evr.c
+++ b/dlls/mf/evr.c
@@ -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);
     }
 




More information about the wine-cvs mailing list