From 7ab646ad482d5a127d320c7c1f16ccb72569b863 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Mon, 12 Oct 2020 14:17:26 +0300 Subject: [PATCH] evr/mixer: Use regular media type interface for input streams. Signed-off-by: Nikolay Sivov Signed-off-by: Alexandre Julliard --- dlls/evr/mixer.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/dlls/evr/mixer.c b/dlls/evr/mixer.c index 631cc796ea0..a18df5c4b3b 100644 --- a/dlls/evr/mixer.c +++ b/dlls/evr/mixer.c @@ -40,7 +40,7 @@ struct input_stream { unsigned int id; IMFAttributes *attributes; - IMFVideoMediaType *media_type; + IMFMediaType *media_type; MFVideoNormalizedRect rect; unsigned int zorder; }; @@ -170,7 +170,7 @@ static void video_mixer_clear_types(struct video_mixer *mixer) for (i = 0; i < mixer->input_count; ++i) { if (mixer->inputs[i].media_type) - IMFVideoMediaType_Release(mixer->inputs[i].media_type); + IMFMediaType_Release(mixer->inputs[i].media_type); mixer->inputs[i].media_type = NULL; } for (i = 0; i < mixer->output.type_count; ++i) @@ -714,14 +714,8 @@ static HRESULT WINAPI video_mixer_transform_SetInputType(IMFTransform *iface, DW if (SUCCEEDED(hr = video_mixer_collect_output_types(mixer, &video_desc, service, count, guids, flags)) && !(flags & MFT_SET_TYPE_TEST_ONLY)) { - GUID subtype = { 0 }; - - if (FAILED(hr = IMFMediaType_GetGUID(media_type, &MF_MT_SUBTYPE, &subtype))) - WARN("Failed to get subtype %#x.\n", hr); - - if (SUCCEEDED(hr = MFCreateVideoMediaTypeFromSubtype(&subtype, &mixer->inputs[0].media_type))) + if (SUCCEEDED(hr = MFCreateMediaType(&mixer->inputs[0].media_type))) hr = IMFMediaType_CopyAllItems(media_type, (IMFAttributes *)mixer->inputs[0].media_type); - } CoTaskMemFree(guids); }