Skip to content

Commit

Permalink
Related to ticket #377: Fixed bug in RTCP fraction_lost calculation: …
Browse files Browse the repository at this point in the history
…the first RTCP packet incorrectly always shows positive fraction loss

git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@1445 74dad513-b988-da41-8d7b-12977e46ad98
  • Loading branch information
bennylp committed Sep 20, 2007
1 parent fe81cfa commit fd156c9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pjmedia/src/pjmedia/rtcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,10 @@ PJ_DEF(void) pjmedia_rtcp_build_rtcp(pjmedia_rtcp_session *sess,
received_interval = sess->received - sess->rx_prior;
sess->rx_prior = sess->received;

lost_interval = expected_interval - received_interval;
if (expected_interval >= received_interval)
lost_interval = expected_interval - received_interval;
else
lost_interval = 0;

if (expected_interval==0 || lost_interval == 0) {
rr->fract_lost = 0;
Expand Down

0 comments on commit fd156c9

Please sign in to comment.