MT#55283 fix RTCP/MOS reporting

We always need to (re)set the ssrc_map_out SSRC, even for the input
context, as this SSRC is used to look up the receiving SSRC context,
where the appropriate RX stats are stored, including the payload type in
use.

Change-Id: I434c6df4761bf56e36c7267dd3a44b0bb9c9b852
pull/1759/head
Richard Fuchs 2 years ago
parent 5f345ec54b
commit 4cbc35e0f2

@ -2071,12 +2071,10 @@ static const char *__stream_ssrc_inout(struct packet_stream *ps, uint32_t ssrc,
ssrc_ctx_hold(*output);
// reverse SSRC mapping
if (dir == SSRC_DIR_OUTPUT) {
if (!output_ssrc)
(*output)->ssrc_map_out = ssrc;
else
(*output)->ssrc_map_out = output_ssrc;
}
if (!output_ssrc)
(*output)->ssrc_map_out = ssrc;
else
(*output)->ssrc_map_out = output_ssrc;
mutex_unlock(lock);
return ret;

@ -1483,7 +1483,7 @@ static GString *rtcp_sender_report(struct ssrc_sender_report *ssr,
struct ssrc_receiver_report *srr = g_slice_alloc(sizeof(*srr));
*srr = (struct ssrc_receiver_report) {
.from = ssrc_out,
.ssrc = s->ssrc_map_out ? : s->parent->h.ssrc,
.ssrc = s->parent->h.ssrc,
.fraction_lost = lost * 256 / (tot + lost),
.packets_lost = lost,
.high_seq_received = atomic64_get(&s->last_seq),

Loading…
Cancel
Save