FS-11788: JB: fix packets per video frame count and allow count on vbw

This commit is contained in:
Dragos Oancea 2019-04-16 19:43:40 +00:00
parent 1c80a83d57
commit f3d21a2d72
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;