Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/vmr9.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index 3b42dd0ed52..8795995b849 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -2670,6 +2670,8 @@ static ULONG WINAPI VMR9_ImagePresenter_Release(IVMRImagePresenter9 *iface) IDirect3DSurface9_Release(surface); }
+ if (This->d3d9_dev) + IDirect3DDevice9_Release(This->d3d9_dev); free(This->d3d9_surfaces); This->d3d9_surfaces = NULL; This->num_surfaces = 0;
Fixes: 7be64a8d3eec3c52dc58a20a178d33dd25de56d0 Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/winegstreamer/gstdemux.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index e8f65a0e6ed..2c9aafd7a6b 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -1713,6 +1713,7 @@ static HRESULT gstdecoder_source_get_media_type(struct gstdemux_source *pin, gst_caps_unref(caps); return S_OK; } + FreeMediaType(mt); }
if (!strcmp(type, "video/x-raw") && index < ARRAY_SIZE(video_formats))
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/amstream/tests/amstream.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/dlls/amstream/tests/amstream.c b/dlls/amstream/tests/amstream.c index 934639258d6..57eae086e23 100644 --- a/dlls/amstream/tests/amstream.c +++ b/dlls/amstream/tests/amstream.c @@ -1786,6 +1786,7 @@ static void test_find_pin(void)
IPin_Release(pin2); IPin_Release(pin); + IMediaStream_Release(stream); IMediaStreamFilter_Release(filter); ref = IAMMultiMediaStream_Release(mmstream); ok(!ref, "Got outstanding refcount %d.\n", ref);
It's not testing anything anymore that's not tested elsewhere.
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/amstream/tests/amstream.c | 122 --------------------------------- 1 file changed, 122 deletions(-)
diff --git a/dlls/amstream/tests/amstream.c b/dlls/amstream/tests/amstream.c index 57eae086e23..31388dcc3a1 100644 --- a/dlls/amstream/tests/amstream.c +++ b/dlls/amstream/tests/amstream.c @@ -122,9 +122,6 @@ static void _expect_ref(IUnknown* obj, ULONG ref, int line) ok_(__FILE__,line)(rc == ref, "expected refcount %d, got %d\n", ref, rc); }
-static IDirectDraw7* pdd7; -static IDirectDrawSurface7* pdds7; - static IAMMultiMediaStream *create_ammultimediastream(void) { IAMMultiMediaStream *stream = NULL; @@ -134,50 +131,6 @@ static IAMMultiMediaStream *create_ammultimediastream(void) return stream; }
-static int create_directdraw(void) -{ - HRESULT hr; - IDirectDraw* pdd = NULL; - DDSURFACEDESC2 ddsd; - - hr = DirectDrawCreate(NULL, &pdd, NULL); - ok(hr==DD_OK, "DirectDrawCreate returned: %x\n", hr); - if (hr != DD_OK) - goto error; - - hr = IDirectDraw_QueryInterface(pdd, &IID_IDirectDraw7, (LPVOID*)&pdd7); - ok(hr==DD_OK, "QueryInterface returned: %x\n", hr); - if (hr != DD_OK) goto error; - - hr = IDirectDraw7_SetCooperativeLevel(pdd7, GetDesktopWindow(), DDSCL_NORMAL); - ok(hr==DD_OK, "SetCooperativeLevel returned: %x\n", hr); - - ZeroMemory(&ddsd, sizeof(ddsd)); - ddsd.dwSize = sizeof(ddsd); - ddsd.dwFlags = DDSD_CAPS; - ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; - hr = IDirectDraw7_CreateSurface(pdd7, &ddsd, &pdds7, NULL); - ok(hr==DD_OK, "CreateSurface returned: %x\n", hr); - - return TRUE; - -error: - if (pdds7) - IDirectDrawSurface7_Release(pdds7); - if (pdd7) - IDirectDraw7_Release(pdd7); - if (pdd) - IDirectDraw_Release(pdd); - - return FALSE; -} - -static void release_directdraw(void) -{ - IDirectDrawSurface7_Release(pdds7); - IDirectDraw7_Release(pdd7); -} - static ULONG get_refcount(void *iface) { IUnknown *unknown = iface; @@ -469,74 +422,6 @@ static void test_mmstream_get_duration(const WCHAR *test_avi_path) ok(!ref, "Got outstanding refcount %d.\n", ref); }
-static void test_renderfile(const WCHAR *test_avi_path) -{ - IAMMultiMediaStream *pams; - HRESULT hr; - IMediaStream *pvidstream = NULL; - IDirectDrawMediaStream *pddstream = NULL; - IDirectDrawStreamSample *pddsample = NULL; - IDirectDrawSurface *surface; - RECT rect; - - if (!(pams = create_ammultimediastream())) - return; - if (!create_directdraw()) - { - IAMMultiMediaStream_Release(pams); - return; - } - - hr = IAMMultiMediaStream_Initialize(pams, STREAMTYPE_READ, 0, NULL); - ok(hr==S_OK, "IAMMultiMediaStream_Initialize returned: %x\n", hr); - - hr = IAMMultiMediaStream_AddMediaStream(pams, (IUnknown*)pdd7, &MSPID_PrimaryVideo, 0, NULL); - ok(hr==S_OK, "IAMMultiMediaStream_AddMediaStream returned: %x\n", hr); - - hr = IAMMultiMediaStream_AddMediaStream(pams, NULL, &MSPID_PrimaryAudio, AMMSF_ADDDEFAULTRENDERER, NULL); - ok(hr == S_OK || hr == VFW_E_NO_AUDIO_HARDWARE, "Got hr %#x.\n", hr); - - hr = IAMMultiMediaStream_OpenFile(pams, test_avi_path, 0); - ok(hr==S_OK, "IAMMultiMediaStream_OpenFile returned: %x\n", hr); - - hr = IAMMultiMediaStream_GetMediaStream(pams, &MSPID_PrimaryVideo, &pvidstream); - ok(hr==S_OK, "IAMMultiMediaStream_GetMediaStream returned: %x\n", hr); - if (FAILED(hr)) goto error; - - hr = IMediaStream_QueryInterface(pvidstream, &IID_IDirectDrawMediaStream, (LPVOID*)&pddstream); - ok(hr==S_OK, "IMediaStream_QueryInterface returned: %x\n", hr); - if (FAILED(hr)) goto error; - - hr = IDirectDrawMediaStream_CreateSample(pddstream, NULL, NULL, 0, &pddsample); - ok(hr == S_OK, "IDirectDrawMediaStream_CreateSample returned: %x\n", hr); - - surface = NULL; - hr = IDirectDrawStreamSample_GetSurface(pddsample, &surface, &rect); - ok(hr == S_OK, "got 0x%08x\n", hr); - ok(surface != NULL, "Expected non-NULL surface.\n"); - IDirectDrawSurface_Release(surface); - IDirectDrawStreamSample_Release(pddsample); - - hr = IDirectDrawSurface7_QueryInterface(pdds7, &IID_IDirectDrawSurface, (void**)&surface); - ok(hr == S_OK, "got 0x%08x\n", hr); - - EXPECT_REF(surface, 1); - hr = IDirectDrawMediaStream_CreateSample(pddstream, surface, &rect, 0, &pddsample); - ok(hr == S_OK, "IDirectDrawMediaStream_CreateSample returned: %x\n", hr); - EXPECT_REF(surface, 2); - IDirectDrawStreamSample_Release(pddsample); - IDirectDrawSurface_Release(surface); - -error: - if (pddstream) - IDirectDrawMediaStream_Release(pddstream); - if (pvidstream) - IMediaStream_Release(pvidstream); - - release_directdraw(); - IAMMultiMediaStream_Release(pams); -} - static const GUID test_mspid = {0x88888888};
struct teststream @@ -1425,11 +1310,6 @@ static void test_media_streams(void)
if (!(pams = create_ammultimediastream())) return; - if (!create_directdraw()) - { - IAMMultiMediaStream_Release(pams); - return; - }
hr = IAMMultiMediaStream_Initialize(pams, STREAMTYPE_READ, 0, NULL); ok(hr == S_OK, "IAMMultiMediaStream_Initialize returned: %x\n", hr); @@ -1624,7 +1504,6 @@ static void test_media_streams(void) if (media_stream_filter) IMediaStreamFilter_Release(media_stream_filter);
- release_directdraw(); IAMMultiMediaStream_Release(pams); }
@@ -6040,7 +5919,6 @@ START_TEST(amstream)
test_openfile(test_avi_path); test_mmstream_get_duration(test_avi_path); - test_renderfile(test_avi_path);
unload_resource(test_avi_path);