From 009c1d66fa202666f778d7df2bbcc522993935cf Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Thu, 7 Oct 2021 10:47:06 -0500 Subject: [PATCH] winegstreamer: Translate GST_AUDIO_CHANNEL_POSITION_MONO to SPEAKER_FRONT_CENTER. Signed-off-by: Zebediah Figura Signed-off-by: Alexandre Julliard --- dlls/winegstreamer/wg_parser.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c index 0c23ae6d351..c3c9051a174 100644 --- a/dlls/winegstreamer/wg_parser.c +++ b/dlls/winegstreamer/wg_parser.c @@ -159,7 +159,10 @@ static uint32_t wg_channel_position_from_gst(GstAudioChannelPosition position) SPEAKER_TOP_BACK_CENTER, }; - if (position < ARRAY_SIZE(position_map)) + if (position == GST_AUDIO_CHANNEL_POSITION_MONO) + return SPEAKER_FRONT_CENTER; + + if (position >= 0 && position < ARRAY_SIZE(position_map)) return position_map[position]; return 0; }