rtprecv: Drop state lock before chaining RTCP packets from the RTP chain function

Otherwise the state lock is taken twice and will cause a deadlock.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2381>
This commit is contained in:
Sebastian Dröge 2025-07-16 18:02:21 +03:00
parent 71d723de48
commit 31af6cb46b

View file

@ -1501,7 +1501,10 @@ impl RtpRecv {
RecvRtpBuffer::SsrcCollision(ssrc) => {
return self.handle_ssrc_collision(session, [ssrc])
}
RecvRtpBuffer::IsRtcp(buffer) => return Self::rtcp_sink_chain(self, id, buffer),
RecvRtpBuffer::IsRtcp(buffer) => {
drop(state);
return Self::rtcp_sink_chain(self, id, buffer);
}
RecvRtpBuffer::Drop => None,
RecvRtpBuffer::Forward((buffer, jb)) => Some((buffer, jb)),
};