mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
module-rtp-sap: Silently ignore other SSRCs if we know the receiver SSRC
If we know the receiver SSRC from the SAP, we can happily ignore packets on other SSRCs.
This commit is contained in:
parent
13e3918f81
commit
25e58995f5
3 changed files with 25 additions and 3 deletions
|
|
@ -197,8 +197,12 @@ invalid_len:
|
|||
pw_log_warn("invalid RTP length");
|
||||
return -EINVAL;
|
||||
unexpected_ssrc:
|
||||
pw_log_warn("unexpected SSRC (expected %u != %u)",
|
||||
impl->ssrc, hdr->ssrc);
|
||||
if (!impl->fixed_ssrc) {
|
||||
/* We didn't have a configured SSRC, and there's more than one SSRC on
|
||||
* this address/port pair */
|
||||
pw_log_warn("unexpected SSRC (expected %u != %u)", impl->ssrc,
|
||||
hdr->ssrc);
|
||||
}
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ struct impl {
|
|||
uint8_t payload;
|
||||
uint32_t ssrc;
|
||||
uint16_t seq;
|
||||
unsigned fixed_ssrc:1;
|
||||
unsigned have_ssrc:1;
|
||||
unsigned ignore_ssrc:1;
|
||||
unsigned have_seq:1;
|
||||
|
|
@ -436,7 +437,7 @@ struct rtp_stream *rtp_stream_new(struct pw_core *core,
|
|||
impl->ssrc = pw_properties_get_uint32(props, "rtp.sender-ssrc", pw_rand32());
|
||||
impl->ts_offset = pw_properties_get_uint32(props, "rtp.sender-ts-offset", pw_rand32());
|
||||
} else {
|
||||
impl->have_ssrc = pw_properties_fetch_uint32(props, "rtp.receiver-ssrc", &impl->ssrc);
|
||||
impl->have_ssrc = impl->fixed_ssrc = pw_properties_fetch_uint32(props, "rtp.receiver-ssrc", &impl->ssrc);
|
||||
if (pw_properties_fetch_uint32(props, "rtp.receiver-ts-offset", &impl->ts_offset) < 0)
|
||||
impl->direct_timestamp = false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue