mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-04-08 08:21:04 -04:00
module-rtp: handle the send_packet/feedback as callbacks
They are emited from the streaming thread and therefore can be emitted concurrently with the events on the main thread. This can cause crashes when the hook list is iterated. Instead, make those events into callbacks that are more efficient, and threadsafe.
This commit is contained in:
parent
fd867cf655
commit
aed82af07f
4 changed files with 13 additions and 7 deletions
|
|
@ -561,7 +561,7 @@ static void rtp_audio_flush_packets(struct impl *impl, uint32_t num_packets, uin
|
|||
(double)timestamp * impl->io_position->clock.rate.num /
|
||||
impl->io_position->clock.rate.denom);
|
||||
|
||||
rtp_stream_emit_send_packet(impl, iov, 3);
|
||||
rtp_stream_call_send_packet(impl, iov, 3);
|
||||
|
||||
impl->seq++;
|
||||
impl->first = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue