From 34d480e397f80446b1eefa2cf25fed608fa10fe8 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Tue, 27 Oct 2026 07:08:49 -0400 Subject: [PATCH] MT#55283 fix ssrc_in non-null dependency logic Change-Id: I47f5ba681f0911961f27bb2fd9f9a4f887ba538c Warned-by: Coverity (cherry picked from commit 44722edaf6eb3ab0ed7c23696fc262ad40fd0e3c) (cherry picked from commit e96bd06b144065a16222568c046d4bc57c7fe2a3) --- daemon/media_socket.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/daemon/media_socket.c b/daemon/media_socket.c index e9539bae3..89ac3595a 100644 --- a/daemon/media_socket.c +++ b/daemon/media_socket.c @@ -3049,11 +3049,11 @@ static void media_packet_rtp_out(struct packet_handler_ctx *phc, struct sink_han const char *unkern = NULL; - uint32_t fixed_ssrc = phc->mp.media_out->fixed_egress_ssrc; + uint32_t fixed_ssrc = phc->mp.ssrc_in ? phc->mp.media_out->fixed_egress_ssrc : 0; /* A fixed egress SSRC is just a mapping from the ingress SSRC, so record it * where every consumer already looks for one. */ - if (fixed_ssrc && phc->mp.ssrc_in) + if (fixed_ssrc) phc->mp.ssrc_in->ssrc_map_out = fixed_ssrc; if (G_LIKELY(!phc->rtcp && phc->mp.rtp)) { @@ -3063,7 +3063,7 @@ static void media_packet_rtp_out(struct packet_handler_ctx *phc, struct sink_han /* a fixed egress SSRC outlives the ingress SSRC, so carry the * sequence numbering across a change of source */ - if (fixed_ssrc && phc->mp.ssrc_out) { + if (fixed_ssrc) { struct ssrc_entry_call *so = phc->mp.ssrc_out; uint32_t in_ssrc = ntohl(phc->mp.rtp->ssrc); uint16_t seq = ntohs(phc->mp.rtp->seq_num);