After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 703669 - gst_rtcp_packet_fb_set_fci_length sets an incorrect buffer size.
gst_rtcp_packet_fb_set_fci_length sets an incorrect buffer size.
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other All
: Normal normal
: 1.1.4
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-07-05 16:41 UTC by Patrik Oldsberg
Modified: 2013-08-20 14:26 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Patrik Oldsberg 2013-07-05 16:41:08 UTC
When using gst_rtcp_packet_fb_set_fci_length to set the length of the
FCI in a feedback message, the buffer becomes 8 bytes longer than expected.

The length that is calculated and written to the packet is later used to increment
the buffer length.

from gstrtcpbuffer.c:
gst_rtcp_packet_fb_set_fci_length (GstRTCPPacket * packet, guint16 wordlen)
  .........
  data = packet->rtcp->map.data + packet->offset + 2;
  wordlen += 2;                                            <= wordlen increased by 2
  GST_WRITE_UINT16_BE (data, wordlen);

  packet->rtcp->map.size += wordlen * 4;  <= wordlen used to increase buffer size

  return TRUE;
}

The resulting buffer is therefore 8 bytes too big, because the non-FCI part of the 
packet is already accounted for when created in gst_rtcp_buffer_add_packet:
...
case GST_RTCP_TYPE_RTPFB:
      len = 12;
      break;
case GST_RTCP_TYPE_PSFB:
      len = 12
...
rtcp->map.size += len;
...
Comment 1 Sebastian Dröge (slomo) 2013-07-09 09:09:43 UTC
Can you provide a patch for that?
Comment 2 Wim Taymans 2013-08-20 14:26:22 UTC
I think this fixed it some time ago:

commit c1da65da5e6da3ae80214e4ae820af754a27d1f5
Author: Wim Taymans <wim.taymans@collabora.co.uk>
Date:   Tue Aug 6 15:42:55 2013 +0200

    rtcpbuffer: calculate FB packet length correctly