Merge pull request #1768 in FS/freeswitch from ~DRAGOS_OANCEA/freeswitch-dragos:FS-11788 to master

* commit 'f3d21a2d727531c518fbc4ef8b5bd75b8db7e2b4':
  FS-11788: JB: fix packets per video frame count and allow count on vbw
This commit is contained in:
Mike Jerris 2019-07-25 16:46:15 -05:00
commit da9c1618c5
1 changed files with 4 additions and 6 deletions

View File

@ -687,13 +687,11 @@ static inline void add_node(switch_jb_t *jb, switch_rtp_packet_t *packet, switch
jb->highest_wrote_ts = packet->header.ts;
jb->complete_frames++;
if (!switch_test_flag(jb, SJB_QUEUE_ONLY)) {
if (jb->packet_count > jb->max_packet_len) {
jb->max_packet_len = jb->packet_count;
}
jb->packet_count = 0;
jb->packet_count--;
if (jb->packet_count > jb->max_packet_len) {
jb->max_packet_len = jb->packet_count;
}
jb->packet_count = 1;
node->complete_frame_mark = TRUE;
} else if (!jb->write_init) {
jb->highest_wrote_ts = packet->header.ts;