GstBaseTransformClass *klass;
GstBaseTransformPrivate *priv;
GstFlowReturn res;
+ gboolean alloced = FALSE;
gboolean proxy, suggest, same_caps;
GstCaps *sink_suggest = NULL;
guint size_suggest;
res = gst_pad_alloc_buffer (trans->srcpad, offset, size, caps, buf);
if (res != GST_FLOW_OK)
goto alloc_failed;
+ alloced = TRUE;
/* check if the caps changed */
newcaps = GST_BUFFER_CAPS (*buf);
if (sink_suggest)
gst_caps_unref (sink_suggest);
- if (res == GST_FLOW_OK) {
+ if (res == GST_FLOW_OK && alloced) {
/* just alloc'ed a buffer, so we only want to do this again if we
* received a buffer */
GST_DEBUG_OBJECT (trans, "Cleaning force alloc");