From b539c54681dfdbe0018b3dc44e4491475efb56cc Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Sun, 3 Aug 2025 14:14:53 -0400 Subject: [PATCH] MT#55283 trigger RTCP send from both send funcs Reverses the side effect of I225b43dff Restores consistency and fixes tests and very slow systems Change-Id: Ib4285e7aae95cd58eccd1d3c4f84e5786b4b0810 (cherry picked from commit ffacde574890d589b434d931fe77f9bbdc78270b) (cherry picked from commit cfe85a69fb890da31f9fe68eca6cdbf9cda73210) --- daemon/media_player.c | 7 +++++++ t/auto-daemon-tests.pl | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/daemon/media_player.c b/daemon/media_player.c index 2c258b01f..d20b5d43e 100644 --- a/daemon/media_player.c +++ b/daemon/media_player.c @@ -457,8 +457,15 @@ static void send_timer_send_nolock(struct send_timer *st, struct codec_packet *c log_info_call(call); + struct ssrc_ctx *ssrc_out = cp->ssrc_out; + if (ssrc_out) + ssrc_ctx_hold(ssrc_out); + __send_timer_send_common(st, cp); + __send_timer_rtcp(st, ssrc_out); + ssrc_ctx_put(&ssrc_out); + log_info_pop(); } diff --git a/t/auto-daemon-tests.pl b/t/auto-daemon-tests.pl index b8ad372af..aead50160 100755 --- a/t/auto-daemon-tests.pl +++ b/t/auto-daemon-tests.pl @@ -17430,9 +17430,9 @@ is $resp->{duration}, 100, 'media duration'; ($seq, $ts, $ssrc) = rcv($sock_a, $port_b, rtpm(8 | 0x80, -1, -1, -1, $pcma_1)); rcv($sock_a, $port_b, rtpm(8, $seq + 1, $ts + 160, $ssrc, $pcma_2)); # SR LEN SSRC NTP1 NTP2 RTP PACKETS OCTETS SSRC LOST SEQ JITTER LAST SR DLSR CNAME -@ret1 = rcv($sock_ax, $port_bx, qr/^\x81\xc8\x00\x0c(.{4})(.{4})(.{4})(.{4})\x00\x00\x00\x02\x00\x00\x01\x58\x00\x00\x12\x34\x00\x00\x00\x00\x00\x00\x03\xe8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\xca\x00\x05(.{4})\x01\x0c([0-9a-f]{12})\x00\x00$/s); +@ret1 = rcv($sock_ax, $port_bx, qr/^\x81\xc8\x00\x0c(.{4})(.{4})(.{4})(.{4})\x00\x00\x00\x01\x00\x00\x00\xac\x00\x00\x12\x34\x00\x00\x00\x00\x00\x00\x03\xe8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\xca\x00\x05(.{4})\x01\x0c([0-9a-f]{12})\x00\x00$/s); is $ret1[0], $ssrc, 'SSRC matches'; -is $ret1[3], $ts + 160, 'TS matches'; +is $ret1[3], $ts, 'TS matches'; is $ret1[4], $ssrc, 'SSRC matches'; rtpe_req('delete', "delete", { 'from-tag' => ft() }); @@ -17506,9 +17506,9 @@ is $resp->{duration}, 100, 'media duration'; ($seq, $ts, $ssrc) = rcv($sock_a, $port_b, rtpm(8 | 0x80, -1, -1, -1, $pcma_1)); rcv($sock_a, $port_b, rtpm(8, $seq + 1, $ts + 160, $ssrc, $pcma_2)); # SR LEN SSRC NTP1 NTP2 RTP PACKETS OCTETS SSRC LOST SEQ JITTER LAST SR DLSR CNAME -@ret1 = rcv($sock_ax, $port_bx, qr/^\x81\xc8\x00\x0c(.{4})(.{4})(.{4})(.{4})\x00\x00\x00\x02\x00\x00\x01\x58\x00\x00\x12\x34\x00\x00\x00\x00\x00\x00\x03\xe8\x00\x00\x00\x00\x56\x78\x9a\xbc(.{4})\x81\xca\x00\x05(.{4})\x01\x0c([0-9a-f]{12})\x00\x00$/s); +@ret1 = rcv($sock_ax, $port_bx, qr/^\x81\xc8\x00\x0c(.{4})(.{4})(.{4})(.{4})\x00\x00\x00\x01\x00\x00\x00\xac\x00\x00\x12\x34\x00\x00\x00\x00\x00\x00\x03\xe8\x00\x00\x00\x00\x56\x78\x9a\xbc(.{4})\x81\xca\x00\x05(.{4})\x01\x0c([0-9a-f]{12})\x00\x00$/s); is $ret1[0], $ssrc, 'SSRC matches'; -is $ret1[3], $ts + 160, 'TS matches'; +is $ret1[3], $ts, 'TS matches'; cmp_ok $ret1[4], '<', 6553, 'DSLR ok'; is $ret1[5], $ssrc, 'SSRC matches';