GNOME Bugzilla – Bug 547728
[basetransform] fail on buffer_alloc
Last modified: 2008-08-14 16:38:18 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.
Created attachment 116560 [details] [review] Always try to alloc a buffer
Created attachment 116562 [details] [review] Always try to alloc a buffer takes a ref of the caps in the pad_lock.
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