From: sgutierrez Date: Thu, 4 Dec 2014 15:07:11 +0000 (+0100) Subject: FS-7052 Moving jb queue swap operation out of the debug block. X-Git-Tag: v1.4.15^2~66^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4be629037508dedc9fe9e50b118b8b5cb9bf422b;p=thirdparty%2Ffreeswitch.git FS-7052 Moving jb queue swap operation out of the debug block. Fixes a bug where the jitter buffer implementation wasn't discarding old packets if debug mode was disabled. --- diff --git a/src/switch_stfu.c b/src/switch_stfu.c index efaec8457a..5923d77a12 100644 --- a/src/switch_stfu.c +++ b/src/switch_stfu.c @@ -744,9 +744,10 @@ static int stfu_n_find_any_frame(stfu_instance_t *in, stfu_queue_t *queue, stfu_ if (was_read == queue->real_array_size) { if (stfu_log != null_logger && in->debug) { stfu_log(STFU_LOG_EMERG, "%s OUT QUEUE EMPTY, SWAPPING\n", in->name); - stfu_n_swap(in); - in->ready = 0; } + + stfu_n_swap(in); + in->ready = 0; return 0; }