rtcpbuffer: Fix validation of packets with padding
authorStian Selnes <stian@pexip.com>
Thu, 2 Jul 2015 18:50:00 +0000 (20:50 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 6 Jul 2015 09:06:47 +0000 (12:06 +0300)
commit1586981b1bf88016ae2e39bde18e111306fbf7f2
tree987b175ebad8341a6e9896052bd53a7a1cb623be
parent008a2288652fdf25baa5af993b4ac76b0634a7ad
rtcpbuffer: Fix validation of packets with padding

The padding (if any) is included in the length of the last packet, see
RFC 3550.

Section 6.4.1:
   padding (P): 1 bit
      If the padding bit is set, this individual RTCP packet contains
      some additional padding octets at the end which are not part of
      the control information but are included in the length field. The
      last octet of the padding is a count of how many padding octets
      should be ignored, including itself (it will be a multiple of
      four).

Section A.2:
   *  The padding bit (P) should be zero for the first packet of a
      compound RTCP packet because padding should only be applied, if it
      is needed, to the last packet.

   *  The length fields of the individual RTCP packets must add up to
      the overall length of the compound RTCP packet as received.

https://bugzilla.gnome.org/show_bug.cgi?id=751883
gst-libs/gst/rtp/gstrtcpbuffer.c
tests/check/libs/rtp.c