]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-7052 Moving jb queue swap operation out of the debug block.
authorsgutierrez <sgutierrez@tuenti.com>
Thu, 4 Dec 2014 15:07:11 +0000 (16:07 +0100)
committersgutierrez <sgutierrez@tuenti.com>
Thu, 4 Dec 2014 15:10:33 +0000 (16:10 +0100)
Fixes a bug where the jitter buffer implementation wasn't discarding
old packets if debug mode was disabled.

src/switch_stfu.c

index efaec8457a88101419384a29864748031cf752b2..5923d77a12f8b8d32be54bf3da1434c9ea9c11ce 100644 (file)
@@ -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;
     }