Changeset 297002cf2c9237445fbe2435d9c9ce3ac3b67ff0

Show
Ignore:
Timestamp:
06/16/08 18:47:40 (3 months ago)
Author:
Rémi Denis-Courmont <rdenis@simphalempin.com>
git-committer:
Rémi Denis-Courmont <rdenis@simphalempin.com> 1213634860 +0300
git-parent:

[9074b2fc7ea620916db536a46ccb8a4340dbdf71]

git-author:
Rémi Denis-Courmont <rdenis@simphalempin.com> 1213634860 +0300
Message:

RTP sout: append RTCP BYE to the Sender Report

Pointed-out-by: Sébastien Escudier

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/stream_out/rtcp.c

    r3561b9b r297002c  
    5454{ 
    5555    size_t   length;  /* RTCP packet length */ 
    56     uint8_t  payload[28 + 8 + (2 * 257)]; 
     56    uint8_t  payload[28 + 8 + (2 * 257) + 8]; 
    5757    int      handle;  /* RTCP socket handler */ 
    5858 
     
    165165 
    166166    uint8_t *ptr = rtcp->payload; 
     167    uint64_t now64 = NTPtime64 (); 
     168    SetQWBE (ptr + 8, now64); /* Update the Sender Report timestamp */ 
     169 
    167170    /* Bye */ 
     171    ptr += rtcp->length; 
    168172    ptr[0] = (2 << 6) | 1; /* V = 2, P = 0, SC = 1 */ 
    169173    ptr[1] = 203; /* payload type: Bye */ 
    170174    SetWBE (ptr + 2, 1); 
    171     /* SSRC is already there :) */ 
     175    memcpy (ptr + 4, rtcp->payload + 4, 4); /* Copy SSRC from Sender Report */ 
     176    rtcp->length += 8; 
    172177 
    173178    /* We are THE sender, so we are more important than anybody else, so 
    174179     * we can afford not to check bandwidth constraints here. */ 
    175     send (rtcp->handle, rtcp->payload, 8, 0); 
     180    send (rtcp->handle, rtcp->payload, rtcp->length, 0); 
    176181    net_Close (rtcp->handle); 
    177182}