[XS] Change in libosmo-netif[master]: twrtp: fix generation of loss info word in RTCP RR blocks
falconia has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/44027?usp=email ) Change subject: twrtp: fix generation of loss info word in RTCP RR blocks ...................................................................... twrtp: fix generation of loss info word in RTCP RR blocks We generate RTCP SR and RR packets that include reception report blocks describing what our twjit received - see RFC 3550 section 6.4.1. These RR blocks include a 32-bit word that reports our receiver's detection of packet loss in the incoming RTP stream; this word consists of an 8-bit "fraction lost" field and a 24-bit "cumulative number of packets lost" field. Our previous code computed each of these separate fields correctly, but the final step of combining them into the 32-bit word applied the wrong shift, producing garbage as a result. Fix it. Change-Id: Ib34239a4f4619fef097b4c1fb5fc3abed339850d --- M src/twrtp.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/27/44027/1 diff --git a/src/twrtp.c b/src/twrtp.c index 1a1b7be..4d81510 100644 --- a/src/twrtp.c +++ b/src/twrtp.c @@ -851,7 +851,7 @@ lost_fract = 0; else lost_fract = (newly_lost << 8) / delta_expect; - lost_word = (lost_fract << 8) | (cumulative_lost & 0xFFFFFF); + lost_word = (lost_fract << 24) | (cumulative_lost & 0xFFFFFF); rr->ssrc = htonl(rri->ssrc); rr->lost_word = htonl(lost_word); -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/44027?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: Ib34239a4f4619fef097b4c1fb5fc3abed339850d Gerrit-Change-Number: 44027 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon@freecalypso.org>
participants (1)
-
falconia