From: Yuxuan Shui <yshui@codeweavers.com> --- dlls/mf/tests/transform.c | 4 ++-- dlls/winegstreamer/wma_decoder.c | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/mf/tests/transform.c b/dlls/mf/tests/transform.c index 9338121fb30..4dd9ff7a93e 100644 --- a/dlls/mf/tests/transform.c +++ b/dlls/mf/tests/transform.c @@ -4086,7 +4086,7 @@ static void test_wma_decoder_dmo_output_type(void) /* Test setting output type to a type with less channels. */ init_dmo_media_type_audio(bad_output_type, &MEDIASUBTYPE_PCM, 1, rate, bits_per_sample); 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); /* Test setting output type to a type with more channels. */ init_dmo_media_type_audio(input_type, input_subtype, 1, rate, 16); @@ -4099,7 +4099,7 @@ static void test_wma_decoder_dmo_output_type(void) ok(hr == S_OK, "SetOutputType returned %#lx.\n", hr); init_dmo_media_type_audio(bad_output_type, &MEDIASUBTYPE_PCM, 2, rate, bits_per_sample); 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); init_dmo_media_type_audio(input_type, input_subtype, channel_count, rate * 2, 32); hr = IMediaObject_SetInputType(dmo, 0, input_type, 0); diff --git a/dlls/winegstreamer/wma_decoder.c b/dlls/winegstreamer/wma_decoder.c index ba9547e9a34..76308a8e63e 100644 --- a/dlls/winegstreamer/wma_decoder.c +++ b/dlls/winegstreamer/wma_decoder.c @@ -801,6 +801,10 @@ static HRESULT WINAPI media_object_SetOutputType(IMediaObject *iface, DWORD inde if (!IsEqualGUID(&type->formattype, &FORMAT_WaveFormatEx)) return DMO_E_TYPE_NOT_ACCEPTED; + if (((WAVEFORMATEX *)decoder->input_type.pbFormat)->nChannels != + ((WAVEFORMATEX *)type->pbFormat)->nChannels) + return DMO_E_TYPE_NOT_ACCEPTED; + if (FAILED(hr = wg_transform_create_quartz(&decoder->input_type, type, &attrs, &new_transform))) return hr; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9575