Skip to content

Commit

Permalink
Correctly handle per m-line Absolute Send Time
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlapa authored Oct 22, 2024
1 parent f487aa9 commit 36ead9e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* Fix RTX stops working after packet loss spike #566
* Configure RTX ratio cap via `StreamTx::set_rtx_cache` #570
* Correctly handle per m-line TWCC #573
* Correctly handle per m-line Absolute Send Time #575

# 0.6.1
* Force openssl to be >=0.10.66 #545
Expand Down
8 changes: 6 additions & 2 deletions src/streams/send.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ use crate::media::MediaKind;
use crate::packet::QueuePriority;
use crate::packet::QueueSnapshot;
use crate::packet::QueueState;
use crate::rtp_::Bitrate;
use crate::rtp_::{extend_u16, Descriptions, ReportList, Rtcp};
use crate::rtp_::{Bitrate, Extension};
use crate::rtp_::{ExtensionMap, ReceptionReport, RtpHeader};
use crate::rtp_::{ExtensionValues, Frequency, MediaTime, Mid, NackEntry};
use crate::rtp_::{Pt, Rid, RtcpFb, SenderInfo, SenderReport, Ssrc};
Expand Down Expand Up @@ -465,7 +465,11 @@ impl StreamTx {

// These need to match `Extension::is_supported()` so we are sending what we are
// declaring we support.
header.ext_vals.abs_send_time = Some(now);

// Absolute Send Time might not be enabled for this m-line.
if exts.id_of(Extension::AbsoluteSendTime).is_some() {
header.ext_vals.abs_send_time = Some(now);
}

// TWCC might not be enabled for this m-line.
if let Some(twcc) = twcc {
Expand Down

0 comments on commit 36ead9e

Please sign in to comment.