Rémi Bernon (@rbernon) commented about dlls/mf/tests/transform.c:
+ hr = get_type(media_object, 1, count, &media_type); + ok(hr == DMO_E_INVALIDSTREAMINDEX, "Got unexpected hr %#lx.\n", hr); + hr = get_type(media_object, 0, count, &media_type); + ok(hr == DMO_E_NO_MORE_ITEMS, "Got unexpected hr %#lx.\n", hr); + hr = get_type(media_object, 0, count, NULL); + ok(hr == DMO_E_NO_MORE_ITEMS || broken(hr == S_OK && type == OUTPUT_FUNC), + "Got unexpected hr %#lx.\n", hr); + hr = get_type(media_object, 0, 0xdeadbeef, NULL); + ok(hr == DMO_E_NO_MORE_ITEMS || broken(hr == S_OK && type == OUTPUT_FUNC), + "Got unexpected hr %#lx.\n", hr); + hr = get_type(media_object, 0, count - 1, NULL); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + hr = get_type(media_object, 0, count - 1, &media_type); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + if (hr == S_OK) + MoFreeMediaType(&media_type); I don't find this very readable. I think it would be better duplicating `check_dmo_get_input_type` / `check_dmo_get_output_type` while keeping the `check_dmo_media_type` helper to check the media type against the expected type.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/1707#note_18849