From: Conor McCarthy cmccarthy@codeweavers.com
Shows that the source is freed even if Shutdown() is not explicitly called. --- dlls/mfplat/tests/mfplat.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/mfplat/tests/mfplat.c b/dlls/mfplat/tests/mfplat.c index 0a2471d3849..6c1c8fa01aa 100644 --- a/dlls/mfplat/tests/mfplat.c +++ b/dlls/mfplat/tests/mfplat.c @@ -1383,8 +1383,10 @@ static void test_source_resolver(void) ok(mediasource != NULL, "got %p\n", mediasource); ok(obj_type == MF_OBJECT_MEDIASOURCE, "got %d\n", obj_type);
- IMFMediaSource_Shutdown(mediasource); + /* Release without calling Shutdown(). In this case, Shutdown() should be called internally when + * releasing the last ref, which will release any references held by contained media streams. */ refcount = IMFMediaSource_Release(mediasource); + todo_wine ok(!refcount, "Unexpected refcount %ld\n", refcount); IMFByteStream_Release(stream);
@@ -1698,7 +1700,10 @@ static void test_source_resolver(void)
IMFRateSupport_Release(rate_support); IMFGetService_Release(get_service); - IMFMediaSource_Release(mediasource); + + refcount = IMFMediaSource_Release(mediasource); + ok(!refcount, "Unexpected refcount %ld\n", refcount); + IMFByteStream_Release(stream);
/* Create directly through scheme handler. */