[Bug 610364] udpsrc allocates buffers with size a lot bigger than needed.

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Tue Jan 1 16:08:47 PST 2013


https://bugzilla.gnome.org/show_bug.cgi?id=610364
  GStreamer | gst-plugins-good | git

--- Comment #6 from Tim-Philipp Müller <t.i.m at zen.co.uk> 2013-01-02 00:08:39 UTC ---
Created an attachment (id=232483)
 View: https://bugzilla.gnome.org/attachment.cgi?id=232483
 Review: https://bugzilla.gnome.org/review?bug=610364&attachment=232483

 udpsrc: sanity check size of available packet data for reading to avoid memory
waste

Naive patch which might help a little in some cases. Still far from optimal of
course.

    On Windows and OS/X, _get_available_bytes() may not return the size
    of the next pending packet, but the size of all pending packets in
    the kernel-side buffer, which might be rather large depending on
    configuration. Sanity-check the size returned by _get_available_bytes()
    to make sure we never allocate more memory than the max. size for
    a packet, if it's an IPv4 socket.

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