mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-09-30 05:05:27 +00:00
module-rtp: Check if packet receive works to track receiving state
If the sender is reset, the RTP stream may return, but may no longer correspond to the stream for which we loaded this instance of module-rtp-source. A power cycle or network reset on Dante devices causes a new SDP and SSRC to be selected, for example. So let's make sure we don't consider invalid receives while tracking our "receiving" state. Arguable, we should bail entirely if this happens.
This commit is contained in:
parent
6b6e9c4ea9
commit
8cd857733b
|
@ -182,8 +182,10 @@ on_rtp_io(void *data, int fd, uint32_t mask)
|
|||
if (len < 12)
|
||||
goto short_packet;
|
||||
|
||||
if (SPA_LIKELY(impl->stream))
|
||||
rtp_stream_receive_packet(impl->stream, buffer, len);
|
||||
if (SPA_LIKELY(impl->stream)) {
|
||||
if (rtp_stream_receive_packet(impl->stream, buffer, len) < 0)
|
||||
goto receive_error;
|
||||
}
|
||||
|
||||
impl->receiving = true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue