Skip to content

Commit

Permalink
Use pkt sequence number to compute timestamp for jitterbuffer packets (
Browse files Browse the repository at this point in the history
  • Loading branch information
atoppi committed Sep 4, 2024
1 parent 212e4fc commit 1cf9294
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/janus_audiobridge.c
Original file line number Diff line number Diff line change
Expand Up @@ -6188,8 +6188,8 @@ void janus_audiobridge_incoming_rtp(janus_plugin_session *handle, janus_plugin_r
JitterBufferPacket jbp = {0};
jbp.data = (char *)pkt;
jbp.len = 0;
jbp.timestamp = ntohl(rtp->timestamp);
jbp.span = (participant->codec == JANUS_AUDIOCODEC_OPUS ? 960 : 160);
jbp.timestamp = (uint32_t)ntohs(rtp->seq_number) * jbp.span;
jitter_buffer_put(participant->jitter, &jbp);
janus_mutex_unlock(&participant->qmutex);
}
Expand Down

0 comments on commit 1cf9294

Please sign in to comment.