GNOME Bugzilla – Bug 363095
[BaseTransform] Outputs empty buffers
Last modified: 2007-03-02 19:02:54 UTC
Currently, BaseTransform based plugins output empty buffers (size=0, data=NULL) when transform_size() returns 0. This causes many problems in plugins that don't support buffers with NULL data. Apart from this, it really is a bug, since GstBaseTransform doesn't output the buffer if *out_buf is NULL in gst_base_transform_chain(), but subclasses have no way of returning NULL, so it should be up to GstBaseTransform to properly handle that. The proposed patch will not allocate an output buffer if the output size is 0.
Created attachment 74927 [details] [review] Don't create output buffer if output size is 0
This patch is not enough though, it requires going through all basetransform based plugins to make sure they don't do anything stupid when given a NULL output buffer.
Created attachment 74947 [details] [review] Better patch This patch in fact calls ::transform() with the empty output buffer, but will not push it.
Created attachment 74960 [details] [review] without the bug previous patch didn't compile (buf != outbuf)
2006-10-25 Edward Hervey <edward@fluendo.com> * libs/gst/base/gstbasetransform.c: (gst_base_transform_chain): Don't push the buffer if it's empty. Closes #363095
reopening, 0 sized buffers are valid, after all.
ping?
closing.