mirror of
git://source.winehq.org/git/wine.git
synced 2024-07-21 09:14:10 +00:00
winegstreamer: Also return output with 2 channels for multichannel inputs from AAC decoder.
This commit is contained in:
parent
bb95f8c2f6
commit
416a273241
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue