]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-10126: [freeswitch-core] General Video Improvements
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 6 Apr 2017 16:53:38 +0000 (11:53 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 6 Apr 2017 16:54:08 +0000 (11:54 -0500)
src/switch_rtp.c

index cbcc415b38546f0a543a14c54f6014a29e1b564d..b87685553dba4b5ba37caf25640a3c51255250e8 100644 (file)
@@ -8017,7 +8017,7 @@ static int rtp_common_write(switch_rtp_t *rtp_session,
        if (send) {
                int delta = 1;
 
-               if (rtp_session->flags[SWITCH_RTP_FLAG_VIDEO] && (*flags & SFF_EXTERNAL) && rtp_session->stats.outbound.packet_count && rtp_session->flags[SWITCH_RTP_FLAG_PASSTHRU]) {
+               if (rtp_session->flags[SWITCH_RTP_FLAG_VIDEO] && (*flags & SFF_EXTERNAL) && rtp_session->stats.outbound.packet_count && rtp_session->flags[SWITCH_RTP_FLAG_PASSTHRU] && rtp_session->last_write_seq) {
                        int32_t x;
                        int32_t y;
 
@@ -8029,12 +8029,13 @@ static int rtp_common_write(switch_rtp_t *rtp_session,
                        }
                        
                        delta = y-x;
+
+                       rtp_session->last_write_seq = rtp_session->seq;
                }
 
                rtp_session->seq += delta;
 
                send_msg->header.seq = htons(rtp_session->seq);
-               rtp_session->last_write_seq = rtp_session->seq;
                
                if (rtp_session->flags[SWITCH_RTP_FLAG_BYTESWAP] && send_msg->header.pt == rtp_session->payload) {
                        switch_swap_linear((int16_t *)send_msg->body, (int) datalen);