Commit 416a2732 authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

winegstreamer: Also return output with 2 channels for multichannel inputs from AAC decoder.

parent bb95f8c2
......@@ -2649,7 +2649,7 @@ static void test_aac_decoder_channels(const struct attribute_desc *input_type_de
}
ok(hr == MF_E_NO_MORE_TYPES, "got %#lx.\n", hr);
if (many_channels)
todo_wine ok(i == ARRAY_SIZE(expect_available_outputs) * 2, "got %lu media types.\n", i);
ok(i == ARRAY_SIZE(expect_available_outputs) * 2, "got %lu media types.\n", i);
else
ok(i == ARRAY_SIZE(expect_available_outputs), "got %lu media types.\n", i);
winetest_pop_context();
......
......@@ -311,6 +311,14 @@ static HRESULT WINAPI transform_GetOutputAvailableType(IMFTransform *iface, DWOR
if (channel_count >= ARRAY_SIZE(default_channel_mask))
return MF_E_INVALIDMEDIATYPE;
if (channel_count > 2 && index >= ARRAY_SIZE(aac_decoder_output_types))
{
/* If there are more than two channels in the input type GetOutputAvailableType additionally lists
* types with 2 channels. */
index -= ARRAY_SIZE(aac_decoder_output_types);
channel_count = 2;
}
if (index >= ARRAY_SIZE(aac_decoder_output_types))
return MF_E_NO_MORE_TYPES;
index = ARRAY_SIZE(aac_decoder_output_types) - index - 1;
......
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