[Bug 698562] New: gstrtpbuffer.c: broken language bindings for gst_rtp_buffer_get_payload

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Mon Apr 22 05:47:43 PDT 2013


https://bugzilla.gnome.org/show_bug.cgi?id=698562
  GStreamer | gst-plugins-base | 1.0.6

           Summary: gstrtpbuffer.c: broken language bindings for
                    gst_rtp_buffer_get_payload
    Classification: Platform
           Product: GStreamer
           Version: 1.0.6
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gst-plugins-base
        AssignedTo: gstreamer-bugs at lists.freedesktop.org
        ReportedBy: branko.subasic at axis.com
         QAContact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---


When calling the function gst_rtp_buffer_get_payload() from Python, i.e.
GstRtp.RTPBuffer.get_payload() the program segfaults.

This is caused by the function returning a byte array, but it lacks a length
parameter to store the returned array's length. This makes it impossible for
the Python bindings to work.

Attached is a patch that remedies this issue.
Since the GstRtpBuffer API is already released we can not simply change the
function. Instead I have added a new function gst_rtp_buffer_get_payload_data()
with the proper parameters and annotation. Also added a 'Rename to:' annotation
in order to replace the original gst_rtp_buffer_get_payload() function with the
new gst_rtp_buffer_get_payload_data() when creating bindings.

There is also an error in the annotations for the function
gst_rtp_buffer_get_extension_data(). This function does have an output
parameter for the length of the array, but it's expressed in number of 32-bit
words. Again, this is a released API and can not simply be changed. Thus I've
added a a new function that basically wraps the this one, but returns the
length in terms of bytes.

-- 
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