mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-15 23:19:17 +00:00
winegstreamer: Fix ColorConvert transform GetCurrent(Input|Output)Type.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
This commit is contained in:
parent
963f76180b
commit
a3b3708134
|
@ -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)
|
static HRESULT WINAPI transform_GetInputCurrentType(IMFTransform *iface, DWORD id, IMFMediaType **type)
|
||||||
{
|
{
|
||||||
struct color_convert *impl = impl_from_IMFTransform(iface);
|
struct color_convert *impl = impl_from_IMFTransform(iface);
|
||||||
IMFMediaType *ret;
|
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
TRACE("iface %p, id %#lx, type %p.\n", iface, id, type);
|
TRACE("iface %p, id %#lx, type %p.\n", iface, id, type);
|
||||||
|
@ -477,16 +476,18 @@ static HRESULT WINAPI transform_GetInputCurrentType(IMFTransform *iface, DWORD i
|
||||||
if (!impl->input_type)
|
if (!impl->input_type)
|
||||||
return MF_E_TRANSFORM_TYPE_NOT_SET;
|
return MF_E_TRANSFORM_TYPE_NOT_SET;
|
||||||
|
|
||||||
if (FAILED(hr = MFCreateMediaType(&ret)))
|
if (FAILED(hr = MFCreateMediaType(type)))
|
||||||
return hr;
|
return hr;
|
||||||
|
|
||||||
return IMFMediaType_CopyAllItems(impl->input_type, (IMFAttributes *)ret);
|
if (FAILED(hr = IMFMediaType_CopyAllItems(impl->input_type, (IMFAttributes *)*type)))
|
||||||
|
IMFMediaType_Release(*type);
|
||||||
|
|
||||||
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI transform_GetOutputCurrentType(IMFTransform *iface, DWORD id, IMFMediaType **type)
|
static HRESULT WINAPI transform_GetOutputCurrentType(IMFTransform *iface, DWORD id, IMFMediaType **type)
|
||||||
{
|
{
|
||||||
struct color_convert *impl = impl_from_IMFTransform(iface);
|
struct color_convert *impl = impl_from_IMFTransform(iface);
|
||||||
IMFMediaType *ret;
|
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
TRACE("iface %p, id %#lx, type %p.\n", iface, id, type);
|
TRACE("iface %p, id %#lx, type %p.\n", iface, id, type);
|
||||||
|
@ -497,10 +498,13 @@ static HRESULT WINAPI transform_GetOutputCurrentType(IMFTransform *iface, DWORD
|
||||||
if (!impl->output_type)
|
if (!impl->output_type)
|
||||||
return MF_E_TRANSFORM_TYPE_NOT_SET;
|
return MF_E_TRANSFORM_TYPE_NOT_SET;
|
||||||
|
|
||||||
if (FAILED(hr = MFCreateMediaType(&ret)))
|
if (FAILED(hr = MFCreateMediaType(type)))
|
||||||
return hr;
|
return hr;
|
||||||
|
|
||||||
return IMFMediaType_CopyAllItems(impl->output_type, (IMFAttributes *)ret);
|
if (FAILED(hr = IMFMediaType_CopyAllItems(impl->output_type, (IMFAttributes *)*type)))
|
||||||
|
IMFMediaType_Release(*type);
|
||||||
|
|
||||||
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI transform_GetInputStatus(IMFTransform *iface, DWORD id, DWORD *flags)
|
static HRESULT WINAPI transform_GetInputStatus(IMFTransform *iface, DWORD id, DWORD *flags)
|
||||||
|
|
Loading…
Reference in a new issue