mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-22 21:37:38 -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
50fcf64058
commit
60062432b8
4 changed files with 13 additions and 7 deletions
|
|
@ -252,7 +252,7 @@ static void rtp_opus_flush_packets(struct impl *impl)
|
|||
pw_log_trace("sending %d len:%d timestamp:%d", tosend, res, timestamp);
|
||||
iov[1].iov_len = res;
|
||||
|
||||
rtp_stream_emit_send_packet(impl, iov, 2);
|
||||
rtp_stream_call_send_packet(impl, iov, 2);
|
||||
|
||||
impl->seq++;
|
||||
timestamp += tosend;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue