From: Yuxuan Shui yshui@codeweavers.com
--- dlls/mf/tests/transform.c | 2 +- dlls/winegstreamer/wma_decoder.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/mf/tests/transform.c b/dlls/mf/tests/transform.c index f2ed6c55894..87df9adf4dd 100644 --- a/dlls/mf/tests/transform.c +++ b/dlls/mf/tests/transform.c @@ -4024,7 +4024,7 @@ static void test_wma_decoder_dmo_output_type(void) init_dmo_media_type_audio(bad_output_type, &MEDIASUBTYPE_PCM, channel_count, rate, bits_per_sample); bad_output_type->formattype = FORMAT_VideoInfo; /* What if formattype is wrong? */ hr = IMediaObject_SetOutputType(dmo, 0, bad_output_type, 0); - todo_wine ok(hr == DMO_E_TYPE_NOT_ACCEPTED, "SetOutputType returned %#lx.\n", hr); + ok(hr == DMO_E_TYPE_NOT_ACCEPTED, "SetOutputType returned %#lx.\n", hr);
hr = IMediaObject_SetOutputType(dmo, 0, good_output_type, 0); ok(hr == S_OK, "SetOutputType returned %#lx.\n", hr); diff --git a/dlls/winegstreamer/wma_decoder.c b/dlls/winegstreamer/wma_decoder.c index 951a50f7164..fd046a6ef01 100644 --- a/dlls/winegstreamer/wma_decoder.c +++ b/dlls/winegstreamer/wma_decoder.c @@ -798,6 +798,9 @@ static HRESULT WINAPI media_object_SetOutputType(IMediaObject *iface, DWORD inde if (IsEqualGUID(&decoder->input_type.majortype, &GUID_NULL)) return DMO_E_TYPE_NOT_SET;
+ if (!IsEqualGUID(&decoder->input_type.formattype, &type->formattype)) + return DMO_E_TYPE_NOT_ACCEPTED; + if (FAILED(hr = wg_transform_create_quartz(&decoder->input_type, &decoder->output_type, &attrs, &new_transform))) return hr;