[Bug 702617] New: Wrong buffer size and loop index in _get_merged_memory in gstbuffer.c
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Tue Jun 18 23:39:13 PDT 2013
https://bugzilla.gnome.org/show_bug.cgi?id=702617
GStreamer | gstreamer (core) | 1.0.7
Summary: Wrong buffer size and loop index in _get_merged_memory
in gstbuffer.c
Classification: Platform
Product: GStreamer
Version: 1.0.7
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: gstreamer (core)
AssignedTo: gstreamer-bugs at lists.freedesktop.org
ReportedBy: visechelle at gmail.com
QAContact: gstreamer-bugs at lists.freedesktop.org
GNOME version: ---
Created an attachment (id=247230)
View: https://bugzilla.gnome.org/attachment.cgi?id=247230
Review: https://bugzilla.gnome.org/review?bug=702617&attachment=247230
Patch
As explain in the title, it seems the size field and the condition to leave the
for loop in _get_merged_memory of gstbuffer.c are wrong.
I noticed this with a custom element which was parsing the RTP buffers after
rtph264pay element. rtph264pay or another element before might store the
payload in more than one blocksize and when retrieving the payload in my
element with gst_rtp_buffer_get_payload(), it merges internally the memory
blocks containing the payload if necessary.
When the payload was stored in more than one block size, it was leading to get
a buffer bigger of RTP header length size than before and messing up my data
inside.
In the patch provided in attachment, I applied the following changes:
- Set the size of the buffer containing the merged memory of the size of the
memory blocks to be merged (and not the size of the full buffer)
- Change the condition to leave the for loop from (i < length) to (i <
idx+length) to handle cases where i > 0.
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list