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 547728 - [basetransform] fail on buffer_alloc
[basetransform] fail on buffer_alloc
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 0.10.21
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-08-14 09:10 UTC by Thijs Vermeir
Modified: 2008-08-14 16:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Always try to alloc a buffer (2.12 KB, patch)
2008-08-14 10:20 UTC, Thijs Vermeir
none Details | Review
Always try to alloc a buffer (1.89 KB, patch)
2008-08-14 10:34 UTC, Thijs Vermeir
none Details | Review

Description Thijs Vermeir 2008-08-14 09:10:37 UTC
gst_base_transform_buffer_alloc can fail to alloc a buffer and still give the GST_FLOW_OK return value. This case happens when the proxy and suggest is both 0.

A recent commit (Revision 1.118) hides this warning from the compiler and let segfault in other elements.
Comment 1 Thijs Vermeir 2008-08-14 10:20:34 UTC
Created attachment 116560 [details] [review]
Always try to alloc a buffer
Comment 2 Thijs Vermeir 2008-08-14 10:34:45 UTC
Created attachment 116562 [details] [review]
Always try to alloc a buffer

takes a ref of the caps in the pad_lock.
Comment 3 Wim Taymans 2008-08-14 16:38:18 UTC
This is what I came up with and should cover all cases as well.

        * libs/gst/base/gstbasetransform.c:
        (gst_base_transform_prepare_output_buffer),
        (gst_base_transform_buffer_alloc):
        Go over the buffer_alloc function again and make sure we always end up
        allocating a buffer.
        Add some more docs.
        Avoid doing pad alloc when we have a pending suggestion because we
        cannot yet deal with changing caps in that case. Fixes #547728