From 5616a97ef25aeedf7330d22b97cbfb7069c0ac68 Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Tue, 14 Mar 2017 12:13:17 +0100 Subject: [PATCH] fix crash in received_rtcp analysis --- coreapi/linphonecall.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index bd33d7621..fe71e1774 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -4185,8 +4185,8 @@ float linphone_call_stats_get_receiver_loss_rate(const LinphoneCallStats *stats) else if (rtcp_is_SR(stats->received_rtcp)) rrb = rtcp_SR_get_report_block(stats->received_rtcp, 0); if (rrb) break; - }while (rtcp_next_packet(stats->sent_rtcp)); - rtcp_rewind(stats->sent_rtcp); + }while (rtcp_next_packet(stats->received_rtcp)); + rtcp_rewind(stats->received_rtcp); if (!rrb) return 0.0; return 100.0f * report_block_get_fraction_lost(rrb) / 256.0f;