Browse Source

Update jitter_buffer.c

Changed the way of excluding RTCP from being processed by JB
pull/1127/head
jakubkarolczyk 5 years ago
committed by GitHub
parent
commit
23dfb952e7
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 3 deletions
  1. +8
    -3
      daemon/jitter_buffer.c

+ 8
- 3
daemon/jitter_buffer.c View File

@ -233,7 +233,7 @@ int buffer_packet(struct media_packet *mp, const str *s) {
rwlock_lock_r(&call->master_lock); rwlock_lock_r(&call->master_lock);
struct jitter_buffer *jb = mp->stream->jb; struct jitter_buffer *jb = mp->stream->jb;
if (!jb || jb->disabled || PS_ISSET(mp->sfd->stream, RTCP))
if (!jb || jb->disabled)
goto end; goto end;
if(jb->initial_pkts < INITIAL_PACKETS) { //Ignore initial Payload Type 126 if any if(jb->initial_pkts < INITIAL_PACKETS) { //Ignore initial Payload Type 126 if any
@ -245,8 +245,13 @@ int buffer_packet(struct media_packet *mp, const str *s) {
if (!p) if (!p)
goto end; goto end;
ilog(LOG_DEBUG, "Handling JB packet on: %s:%d", sockaddr_print_buf(&mp->stream->endpoint.address),
mp->stream->endpoint.port);
if ((p->mp.rtp->m_pt & 0x7f) >=72 && (p->mp.rtp->m_pt & 0x7f) <= 76){
ilog(LOG_DEBUG, "Discard from JB. This is RTCP packet. SSRC %u Payload %d", ntohl(p->mp.rtp->ssrc), (p->mp.rtp->m_pt & 0x7f));
goto end;
}
ilog(LOG_DEBUG, "Handling JB packet on: %s:%d (RTP SSRC %u Payload: %d)", sockaddr_print_buf(&mp->stream->endpoint.address),
mp->stream->endpoint.port, ntohl(p->mp.rtp->ssrc), (p->mp.rtp->m_pt & 0x7f));
mp = &p->mp; mp = &p->mp;


Loading…
Cancel
Save