Zebediah Figura : quartz/vmr9: Don't expose IVMRSurfaceAllocatorNotify from the VMR9.

Alexandre Julliard julliard at winehq.org
Wed Apr 29 16:11:12 CDT 2020


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

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Tue Apr 28 17:44:43 2020 -0500

quartz/vmr9: Don't expose IVMRSurfaceAllocatorNotify from the VMR9.

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/quartz/tests/vmr9.c |  2 +-
 dlls/quartz/vmr9.c       | 10 ++++++++--
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/dlls/quartz/tests/vmr9.c b/dlls/quartz/tests/vmr9.c
index e78d20a411..4bba6f7431 100644
--- a/dlls/quartz/tests/vmr9.c
+++ b/dlls/quartz/tests/vmr9.c
@@ -298,7 +298,7 @@ static void test_interfaces(void)
     check_interface(filter, &IID_IVMRMixerControl, FALSE);
     todo_wine check_interface(filter, &IID_IVMRMonitorConfig, FALSE);
     todo_wine check_interface(filter, &IID_IVMRMonitorConfig9, FALSE);
-    todo_wine check_interface(filter, &IID_IVMRSurfaceAllocatorNotify, FALSE);
+    check_interface(filter, &IID_IVMRSurfaceAllocatorNotify, FALSE);
     check_interface(filter, &IID_IVMRWindowlessControl, FALSE);
     check_interface(filter, &IID_IVMRWindowlessControl9, FALSE);
 
diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c
index 389166db3e..c847b9c448 100644
--- a/dlls/quartz/vmr9.c
+++ b/dlls/quartz/vmr9.c
@@ -91,6 +91,11 @@ struct quartz_vmr
     HANDLE run_event;
 };
 
+static inline BOOL is_vmr9(const struct quartz_vmr *filter)
+{
+    return IsEqualGUID(&filter->renderer.filter.clsid, &CLSID_VideoMixingRenderer9);
+}
+
 static inline struct quartz_vmr *impl_from_video_window(struct video_window *iface)
 {
     return CONTAINING_RECORD(iface, struct quartz_vmr, baseControlWindow);
@@ -435,7 +440,7 @@ static HRESULT VMR9_maybe_init(struct quartz_vmr *filter, BOOL force, const AM_M
         return E_FAIL;
     }
 
-    if (IsEqualGUID(&filter->renderer.filter.clsid, &CLSID_VideoMixingRenderer))
+    if (!is_vmr9(filter))
     {
         switch (filter->bmiheader.biBitCount)
         {
@@ -621,7 +626,8 @@ static HRESULT vmr_query_interface(struct strmbase_renderer *iface, REFIID iid,
         *out = &filter->IVMRMonitorConfig_iface;
     else if (IsEqualGUID(iid, &IID_IVMRMonitorConfig9))
         *out = &filter->IVMRMonitorConfig9_iface;
-    else if (IsEqualGUID(iid, &IID_IVMRSurfaceAllocatorNotify) && filter->mode == (VMR9Mode)VMRMode_Renderless)
+    else if (IsEqualGUID(iid, &IID_IVMRSurfaceAllocatorNotify)
+            && filter->mode == (VMR9Mode)VMRMode_Renderless && !is_vmr9(filter))
         *out = &filter->IVMRSurfaceAllocatorNotify_iface;
     else if (IsEqualGUID(iid, &IID_IVMRSurfaceAllocatorNotify9) && filter->mode == VMR9Mode_Renderless)
         *out = &filter->IVMRSurfaceAllocatorNotify9_iface;




More information about the wine-cvs mailing list