From a09c83dcc80a5b077c00eadaad533e6fc0fa5205 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Wed, 14 Oct 2026 08:00:50 -0400 Subject: [PATCH] MT#55283 keep number of slots if media slots is unset Closes #2208 Change-Id: I00b7f2a17e13318b0628f0b2a06284e5b761e6dc (cherry picked from commit e891e0a21948570d83863b519fccf20f6de151be) --- daemon/recording.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/daemon/recording.c b/daemon/recording.c index 0a851ad83..4749a5ca3 100644 --- a/daemon/recording.c +++ b/daemon/recording.c @@ -1047,16 +1047,17 @@ static void setup_stream_proc(struct packet_stream *stream) { // If no slots have been specified or someone has tried to use slott 0 then we set the variables up so that the mix // channels will be used in sequence as each SSRC is seen. (see mix.c for the algorithm) - if(call->media_rec_slots < 1 || media->media_rec_slot < 1) { + if(call->media_rec_slots < 1) { media_rec_slot = 1; media_rec_slots = 1; } else { - media_rec_slot = media->media_rec_slot; + media_rec_slot = media->media_rec_slot < 1 ? 1 : media->media_rec_slot; media_rec_slots = call->media_rec_slots; } - if(media_rec_slot > media_rec_slots) { - ilog(LOG_ERR, "slot %i is greater than the total number of slots available %i, setting to slot %i", media->media_rec_slot, call->media_rec_slots, media_rec_slots); + if (media_rec_slot > media_rec_slots) { + ilog(LOG_ERR, "slot %i is greater than the total number of slots available %i, setting to slot %i", + media->media_rec_slot, call->media_rec_slots, media_rec_slots); media_rec_slot = media_rec_slots; }