Subject: [AVT] Question about the RFC 3550 RTCP pseudo-code

From: Ross Finlayson <[email-masked]>
Date: Tue, 8 Apr 2008 23:16:01 -0700

The pseudo-code for RTCP in RFC 3550 (the RTP/RTCP specification) 
includes the following:

    void OnReceive(packet p,
                   event e,
                   int *members,
	  ...)
    {
        /* What we do depends on whether we have left the group, and are
         * waiting to send a BYE (TypeOfEvent(e) == EVENT_BYE) or an RTCP
         * report.  p represents the packet that was just received.  */

        if (PacketType(p) == PACKET_RTCP_REPORT) {
            ...
        } else if (PacketType(p) == PACKET_RTP) {
            ...
        } else if (PacketType(p) == PACKET_BYE) {
            ...

            if (TypeOfEvent(e) == EVENT_REPORT) {
                ...
            } else if (TypeOfEvent(e) == EVENT_BYE) {
                *members += 1;
            }
        }
    }

Why is the last line "*members +=1;" and not "*members -= 1;"?

	Ross.
_______________________________________________
Audio/Video Transport Working Group
[email-masked]
https://www.ietf.org/mailman/listinfo/avt

---

From: Magnus Westerlund <[email-masked]>
Date: Wed, 09 Apr 2008 09:00:45 +0200

> Why is the last line "*members +=1;" and not "*members -= 1;"?

Because there is a special rule for when a end-point is leaving a 
session, i.e. waiting to send BYE. Which the comment in the code 
indicates. In that face one retargets the members counter to count 
number of BYE messages received to make the correct back off to avoid 
floods of RTCP BYE.

Cheers

Magnus Westerlund

IETF Transport Area Director & TSVWG Chair
----------------------------------------------------------------------
Multimedia Technologies, Ericsson Research EAB/TVM
----------------------------------------------------------------------
Ericsson AB                | Phone +46 8 4048287
Färögatan 6                | Fax   +46 8 7575550
S-164 80 Stockholm, Sweden | mailto: [email-masked]
----------------------------------------------------------------------