FS-11750: don't shrink NACK table (vbw) so drastically (don't drop a frame with every added packet when complete_frames > max_frame_len)

This commit is contained in:
Dragos Oancea 2019-04-02 16:59:45 +00:00
parent 32de076b18
commit cfcb8b5d2f
1 changed files with 5 additions and 2 deletions

View File

@ -1251,8 +1251,11 @@ SWITCH_DECLARE(switch_status_t) switch_jb_put_packet(switch_jb_t *jb, switch_rtp
add_node(jb, packet, len);
if (switch_test_flag(jb, SJB_QUEUE_ONLY) && jb->complete_frames > jb->max_frame_len) {
drop_oldest_frame(jb);
if (switch_test_flag(jb, SJB_QUEUE_ONLY) && jb->max_packet_len
&& jb->allocated_nodes > jb->max_frame_len * 2 - 1) {
while ((jb->max_frame_len * 2 - jb->visible_nodes) < jb->max_packet_len) {
drop_oldest_frame(jb);
}
}
switch_mutex_unlock(jb->mutex);