]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-10017
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 7 Feb 2017 20:35:24 +0000 (14:35 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 7 Feb 2017 20:35:24 +0000 (14:35 -0600)
src/switch_rtp.c

index e9270cc4cc3e69373540b0cb7e9811571f2c075e..a5c5a8d48bf75aa389c8f0242a18ab0a62988edc 100644 (file)
@@ -7914,19 +7914,21 @@ static int rtp_common_write(switch_rtp_t *rtp_session,
                
                if (rtp_session->flags[SWITCH_RTP_FLAG_NACK]) {
                        switch_channel_t *channel = switch_core_session_get_channel(rtp_session->session);
-                       int nack_size = 100;
-                       const char *var;
-
-                       if ((var = switch_channel_get_variable(channel, "rtp_nack_buffer_size"))) {
-                               int tmp = atoi(var);
 
-                               if (tmp > 0 && tmp < 500) {
-                                       nack_size = tmp;
+                       if (!rtp_session->vbw) {
+                               int nack_size = 100;
+                               const char *var;
+                               
+                               if ((var = switch_channel_get_variable(channel, "rtp_nack_buffer_size"))) {
+                                       int tmp = atoi(var);
+                                       
+                                       if (tmp > 0 && tmp < 500) {
+                                               nack_size = tmp;
+                                       }
                                }
-                       }
 
-                       if (!rtp_session->vbw) {
                                switch_jb_create(&rtp_session->vbw, SJB_VIDEO, nack_size, nack_size, rtp_session->pool);
+
                                if (rtp_session->vbw) {
                                        switch_jb_set_flag(rtp_session->vbw, SJB_QUEUE_ONLY);
                                        //switch_jb_debug_level(rtp_session->vbw, 10);