[PATCH v2 2/4] winegstreamer: Fix ColorConvert transform GetCurrent(Input|Output)Type.

Rémi Bernon wine at gitlab.winehq.org
Mon Jul 4 14:05:33 CDT 2022


From: Rémi Bernon <rbernon at codeweavers.com>

Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
---
 dlls/winegstreamer/color_convert.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/dlls/winegstreamer/color_convert.c b/dlls/winegstreamer/color_convert.c
index 66a86aa4602..b84cad37dd3 100644
--- a/dlls/winegstreamer/color_convert.c
+++ b/dlls/winegstreamer/color_convert.c
@@ -466,7 +466,6 @@ static HRESULT WINAPI transform_SetOutputType(IMFTransform *iface, DWORD id, IMF
 static HRESULT WINAPI transform_GetInputCurrentType(IMFTransform *iface, DWORD id, IMFMediaType **type)
 {
     struct color_convert *impl = impl_from_IMFTransform(iface);
-    IMFMediaType *ret;
     HRESULT hr;
 
     TRACE("iface %p, id %#lx, type %p.\n", iface, id, type);
@@ -477,16 +476,15 @@ static HRESULT WINAPI transform_GetInputCurrentType(IMFTransform *iface, DWORD i
     if (!impl->input_type)
         return MF_E_TRANSFORM_TYPE_NOT_SET;
 
-    if (FAILED(hr = MFCreateMediaType(&ret)))
+    if (FAILED(hr = MFCreateMediaType(type)))
         return hr;
 
-    return IMFMediaType_CopyAllItems(impl->input_type, (IMFAttributes *)ret);
+    return IMFMediaType_CopyAllItems(impl->input_type, (IMFAttributes *)*type);
 }
 
 static HRESULT WINAPI transform_GetOutputCurrentType(IMFTransform *iface, DWORD id, IMFMediaType **type)
 {
     struct color_convert *impl = impl_from_IMFTransform(iface);
-    IMFMediaType *ret;
     HRESULT hr;
 
     TRACE("iface %p, id %#lx, type %p.\n", iface, id, type);
@@ -497,10 +495,10 @@ static HRESULT WINAPI transform_GetOutputCurrentType(IMFTransform *iface, DWORD
     if (!impl->output_type)
         return MF_E_TRANSFORM_TYPE_NOT_SET;
 
-    if (FAILED(hr = MFCreateMediaType(&ret)))
+    if (FAILED(hr = MFCreateMediaType(type)))
         return hr;
 
-    return IMFMediaType_CopyAllItems(impl->output_type, (IMFAttributes *)ret);
+    return IMFMediaType_CopyAllItems(impl->output_type, (IMFAttributes *)*type);
 }
 
 static HRESULT WINAPI transform_GetInputStatus(IMFTransform *iface, DWORD id, DWORD *flags)
-- 
GitLab


https://gitlab.winehq.org/wine/wine/-/merge_requests/369



More information about the wine-devel mailing list