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:
Wim Taymans 2026-03-26 09:34:45 +01:00
parent fd867cf655
commit aed82af07f
4 changed files with 13 additions and 7 deletions

View file

@ -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;