mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-03 15:58:42 +00:00
rtpbin2: Add support for receiving rtcp-mux packets
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1426>
This commit is contained in:
parent
e09ad990fa
commit
2b4ec75bc5
1 changed files with 9 additions and 1 deletions
|
@ -639,7 +639,15 @@ impl RtpBin2 {
|
|||
let rtp = match rtp_types::RtpPacket::parse(&mapped) {
|
||||
Ok(rtp) => rtp,
|
||||
Err(e) => {
|
||||
// TODO: handle if it's a valid rtcp-muxed RTCP packet
|
||||
// If this is a valid RTCP packet then it was muxed with the RTP stream and can be
|
||||
// handled just fine.
|
||||
if rtcp_types::Compound::parse(&mapped).map_or(false, |mut rtcp| {
|
||||
rtcp.next().map_or(false, |rtcp| rtcp.is_ok())
|
||||
}) {
|
||||
drop(mapped);
|
||||
return Self::rtcp_recv_sink_chain(self, id, buffer);
|
||||
}
|
||||
|
||||
gst::error!(CAT, imp: self, "Failed to parse input as valid rtp packet: {e:?}");
|
||||
return Ok(gst::FlowSuccess::Ok);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue