[PATCH 5/5] quartz/vmr9: Remove the "force" parameter of VMR9_maybe_init().

Zebediah Figura z.figura12 at gmail.com
Fri May 1 22:52:03 CDT 2020


Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
 dlls/quartz/vmr9.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c
index 113cb7cea40..93fc3417e7f 100644
--- a/dlls/quartz/vmr9.c
+++ b/dlls/quartz/vmr9.c
@@ -387,7 +387,7 @@ static HRESULT initialize_device(struct quartz_vmr *filter, VMR9AllocationInfo *
     return hr;
 }
 
-static HRESULT VMR9_maybe_init(struct quartz_vmr *filter, BOOL force, const AM_MEDIA_TYPE *mt)
+static HRESULT allocate_surfaces(struct quartz_vmr *filter, const AM_MEDIA_TYPE *mt)
 {
     VMR9AllocationInfo info = {};
     HRESULT hr = E_FAIL;
@@ -418,11 +418,9 @@ static HRESULT VMR9_maybe_init(struct quartz_vmr *filter, BOOL force, const AM_M
 
     TRACE("Initializing in mode %u, our window %p, clipping window %p.\n",
             filter->mode, filter->baseControlWindow.hwnd, filter->hWndClippingWindow);
-    if (filter->num_surfaces)
-        return S_OK;
 
     if (filter->mode == VMR9Mode_Windowless && !filter->hWndClippingWindow)
-        return (force ? VFW_E_RUNTIME_ERROR : S_OK);
+        return S_OK;
 
     info.dwWidth = filter->source_rect.right;
     info.dwHeight = filter->source_rect.bottom;
@@ -542,7 +540,7 @@ static HRESULT vmr_connect(struct strmbase_renderer *iface, const AM_MEDIA_TYPE
 
     if (filter->mode
             || SUCCEEDED(hr = IVMRFilterConfig9_SetRenderingMode(&filter->IVMRFilterConfig9_iface, VMR9Mode_Windowed)))
-        hr = VMR9_maybe_init(filter, FALSE, mt);
+        hr = allocate_surfaces(filter, mt);
 
     return hr;
 }
-- 
2.26.2




More information about the wine-devel mailing list