Zebediah Figura : amstream/tests: Commit the allocator directly.

Alexandre Julliard julliard at winehq.org
Wed Nov 18 15:47:59 CST 2020


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

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Tue Nov 17 16:30:55 2020 -0600

amstream/tests: Commit the allocator directly.

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

---

 dlls/amstream/tests/amstream.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/dlls/amstream/tests/amstream.c b/dlls/amstream/tests/amstream.c
index 3027226848a..279b040339c 100644
--- a/dlls/amstream/tests/amstream.c
+++ b/dlls/amstream/tests/amstream.c
@@ -1008,9 +1008,13 @@ static void testfilter_destroy(struct strmbase_filter *iface)
 static HRESULT testfilter_init_stream(struct strmbase_filter *iface)
 {
     struct testfilter *filter = impl_from_BaseFilter(iface);
+    HRESULT hr;
 
-    if (SUCCEEDED(filter->init_stream_hr))
-        BaseOutputPinImpl_Active(&filter->source);
+    if (SUCCEEDED(filter->init_stream_hr) && filter->source.pin.peer)
+    {
+        hr = IMemAllocator_Commit(filter->source.pAllocator);
+        ok(hr == S_OK, "Got hr %#x.\n", hr);
+    }
 
     return filter->init_stream_hr;
 }
@@ -1018,9 +1022,13 @@ static HRESULT testfilter_init_stream(struct strmbase_filter *iface)
 static HRESULT testfilter_cleanup_stream(struct strmbase_filter *iface)
 {
     struct testfilter *filter = impl_from_BaseFilter(iface);
+    HRESULT hr;
 
-    if (SUCCEEDED(filter->cleanup_stream_hr))
-        BaseOutputPinImpl_Inactive(&filter->source);
+    if (SUCCEEDED(filter->cleanup_stream_hr) && filter->source.pin.peer)
+    {
+        hr = IMemAllocator_Decommit(filter->source.pAllocator);
+        ok(hr == S_OK, "Got hr %#x.\n", hr);
+    }
 
     return filter->cleanup_stream_hr;
 }




More information about the wine-cvs mailing list