mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-07 13:30:09 -05: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
1 changed files with 4 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue