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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5793>
This commit is contained in:
Doug Nazar 2023-11-27 09:01:38 -05:00 committed by Tim-Philipp Müller
parent ec9ddb6222
commit 51939b62b8

View file

@ -2086,6 +2086,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;