Zebediah Figura : strmbase: Get rid of the unused "lock" parameter to BaseControlWindow_Init().

Alexandre Julliard julliard at winehq.org
Fri Oct 18 14:01:15 CDT 2019


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

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Fri Oct 18 10:01:49 2019 -0500

strmbase: Get rid of the unused "lock" parameter to BaseControlWindow_Init().

We don't use a lock, and while it's true we probably should be, we already
have access to one.

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

---

 dlls/quartz/videorenderer.c | 6 +++---
 dlls/quartz/vmr9.c          | 5 ++---
 dlls/strmbase/window.c      | 5 ++---
 include/wine/strmbase.h     | 5 ++---
 4 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/dlls/quartz/videorenderer.c b/dlls/quartz/videorenderer.c
index db5ee0fbf4..a11c2047a6 100644
--- a/dlls/quartz/videorenderer.c
+++ b/dlls/quartz/videorenderer.c
@@ -846,9 +846,9 @@ HRESULT VideoRenderer_create(IUnknown *outer, void **out)
     if (FAILED(hr))
         goto fail;
 
-    hr = BaseControlWindow_Init(&pVideoRenderer->baseControlWindow, &IVideoWindow_VTable,
-            &pVideoRenderer->renderer.filter, &pVideoRenderer->renderer.filter.csFilter,
-            &pVideoRenderer->renderer.sink.pin, &renderer_BaseWindowFuncTable);
+    hr = strmbase_window_init(&pVideoRenderer->baseControlWindow, &IVideoWindow_VTable,
+            &pVideoRenderer->renderer.filter, &pVideoRenderer->renderer.sink.pin,
+            &renderer_BaseWindowFuncTable);
     if (FAILED(hr))
         goto fail;
 
diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c
index 59a5152cf5..c3b948f599 100644
--- a/dlls/quartz/vmr9.c
+++ b/dlls/quartz/vmr9.c
@@ -2251,9 +2251,8 @@ static HRESULT vmr_create(IUnknown *outer, void **out, const CLSID *clsid)
     if (FAILED(hr))
         goto fail;
 
-    hr = BaseControlWindow_Init(&pVMR->baseControlWindow, &IVideoWindow_VTable,
-            &pVMR->renderer.filter, &pVMR->renderer.filter.csFilter,
-            &pVMR->renderer.sink.pin, &renderer_BaseWindowFuncTable);
+    hr = strmbase_window_init(&pVMR->baseControlWindow, &IVideoWindow_VTable,
+            &pVMR->renderer.filter, &pVMR->renderer.sink.pin, &renderer_BaseWindowFuncTable);
     if (FAILED(hr))
         goto fail;
 
diff --git a/dlls/strmbase/window.c b/dlls/strmbase/window.c
index 23f37de52b..be6646c27a 100644
--- a/dlls/strmbase/window.c
+++ b/dlls/strmbase/window.c
@@ -144,9 +144,9 @@ HRESULT WINAPI BaseWindowImpl_DoneWithWindow(BaseWindow *This)
     return S_OK;
 }
 
-HRESULT WINAPI BaseControlWindow_Init(BaseControlWindow *pControlWindow,
+HRESULT WINAPI strmbase_window_init(BaseControlWindow *pControlWindow,
         const IVideoWindowVtbl *lpVtbl, struct strmbase_filter *owner,
-        CRITICAL_SECTION *lock, struct strmbase_pin *pPin, const BaseWindowFuncTable *pFuncsTable)
+        struct strmbase_pin *pPin, const BaseWindowFuncTable *pFuncsTable)
 {
     HRESULT hr;
 
@@ -158,7 +158,6 @@ HRESULT WINAPI BaseControlWindow_Init(BaseControlWindow *pControlWindow,
         pControlWindow->hwndDrain = NULL;
         pControlWindow->hwndOwner = NULL;
         pControlWindow->pFilter = owner;
-        pControlWindow->pInterfaceLock = lock;
         pControlWindow->pPin = pPin;
     }
     return hr;
diff --git a/include/wine/strmbase.h b/include/wine/strmbase.h
index 5be7caa371..74c8f4721b 100644
--- a/include/wine/strmbase.h
+++ b/include/wine/strmbase.h
@@ -403,12 +403,11 @@ typedef struct tagBaseControlWindow
 	HWND hwndDrain;
 	HWND hwndOwner;
 	struct strmbase_filter *pFilter;
-	CRITICAL_SECTION* pInterfaceLock;
 	struct strmbase_pin *pPin;
 } BaseControlWindow;
 
-HRESULT WINAPI BaseControlWindow_Init(BaseControlWindow *window, const IVideoWindowVtbl *vtbl,
-        struct strmbase_filter *filter, CRITICAL_SECTION *lock, struct strmbase_pin *pin, const BaseWindowFuncTable *ops);
+HRESULT WINAPI strmbase_window_init(BaseControlWindow *window, const IVideoWindowVtbl *vtbl,
+        struct strmbase_filter *filter, struct strmbase_pin *pin, const BaseWindowFuncTable *func_table);
 HRESULT WINAPI BaseControlWindow_Destroy(BaseControlWindow *pControlWindow);
 
 BOOL WINAPI BaseControlWindowImpl_PossiblyEatMessage(BaseWindow *This, UINT uMsg, WPARAM wParam, LPARAM lParam);




More information about the wine-cvs mailing list