Commit c91211f3 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

winegstreamer/video_processor: Allow clearing input / output types.

parent 101d82c3
......@@ -347,6 +347,22 @@ static HRESULT WINAPI video_processor_SetInputType(IMFTransform *iface, DWORD id
TRACE("iface %p, id %#lx, type %p, flags %#lx.\n", iface, id, type, flags);
if (!type)
{
if (impl->input_type)
{
IMFMediaType_Release(impl->input_type);
impl->input_type = NULL;
}
if (impl->wg_transform)
{
wg_transform_destroy(impl->wg_transform);
impl->wg_transform = 0;
}
return S_OK;
}
if (FAILED(IMFMediaType_GetGUID(type, &MF_MT_MAJOR_TYPE, &major))
|| !IsEqualGUID(&major, &MFMediaType_Video))
return E_INVALIDARG;
......@@ -390,6 +406,22 @@ static HRESULT WINAPI video_processor_SetOutputType(IMFTransform *iface, DWORD i
TRACE("iface %p, id %#lx, type %p, flags %#lx.\n", iface, id, type, flags);
if (!type)
{
if (impl->output_type)
{
IMFMediaType_Release(impl->output_type);
impl->output_type = NULL;
}
if (impl->wg_transform)
{
wg_transform_destroy(impl->wg_transform);
impl->wg_transform = 0;
}
return S_OK;
}
if (FAILED(IMFMediaType_GetGUID(type, &MF_MT_MAJOR_TYPE, &major))
|| !IsEqualGUID(&major, &MFMediaType_Video))
return E_INVALIDARG;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment