From 155224de96c68dd61d93ec06be8db80320681439 Mon Sep 17 00:00:00 2001 From: Doug Nazar Date: Mon, 27 Nov 2023 09:01:38 -0500 Subject: [PATCH] audioringbuffer: Don't try to map MONO channel Avoids critical message: gstaudioringbuffer.c: line 2155 (gst_audio_ring_buffer_set_channel_positions): should not be reached Part-of: --- .../gst-plugins-base/gst-libs/gst/audio/gstaudioringbuffer.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/subprojects/gst-plugins-base/gst-libs/gst/audio/gstaudioringbuffer.c b/subprojects/gst-plugins-base/gst-libs/gst/audio/gstaudioringbuffer.c index 5705f34287..1aee68fec4 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/audio/gstaudioringbuffer.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/audio/gstaudioringbuffer.c @@ -2145,6 +2145,11 @@ gst_audio_ring_buffer_set_channel_positions (GstAudioRingBuffer * buf, if (memcmp (position, to, channels * sizeof (to[0])) == 0) return; + if (channels == 1) { + GST_LOG_OBJECT (buf, "single channel, no need to reorder"); + return; + } + if (position_less_channels (position, channels)) { GST_LOG_OBJECT (buf, "position-less channels, no need to reorder"); return;