libs/gst/base/gstbasetransform.c: Only call downstream buffer_alloc if transform element is passthrough or always_in_...

Original commit message from CVS:
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_buffer_alloc):
Only call downstream buffer_alloc if transform element is passthrough
or always_in_place. Closes #350449.
This commit is contained in:
Edward Hervey 2006-08-21 09:20:42 +00:00
parent eca76aa115
commit 4abd3fb116
2 changed files with 23 additions and 6 deletions

View file

@ -1,3 +1,10 @@
2006-08-21 Edward Hervey <edward@fluendo.com>
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_buffer_alloc):
Only call downstream buffer_alloc if transform element is passthrough
or always_in_place. Closes #350449.
2006-08-20 Stefan Kost <ensonic@users.sf.net>
* ChangeLog:

View file

@ -1160,9 +1160,14 @@ not_configured:
/* let the default allocator handle it... */
GST_DEBUG_OBJECT (trans, "not configured");
gst_buffer_replace (buf, NULL);
/* ...by calling alloc_buffer without setting caps on the src pad, which
* will force negotiation in the chain function. */
res = gst_pad_alloc_buffer (trans->srcpad, offset, size, caps, buf);
if (trans->passthrough || trans->always_in_place) {
/* ...by calling alloc_buffer without setting caps on the src pad, which
* will force negotiation in the chain function. */
res = gst_pad_alloc_buffer (trans->srcpad, offset, size, caps, buf);
} else {
/* ...by letting the default handler create a buffer */
res = GST_FLOW_OK;
}
goto done;
}
unknown_size:
@ -1170,9 +1175,14 @@ unknown_size:
/* let the default allocator handle it... */
GST_DEBUG_OBJECT (trans, "unknown size");
gst_buffer_replace (buf, NULL);
/* ...by calling alloc_buffer without setting caps on the src pad, which
* will force negotiation in the chain function. */
res = gst_pad_alloc_buffer (trans->srcpad, offset, size, caps, buf);
if (trans->passthrough || trans->always_in_place) {
/* ...by calling alloc_buffer without setting caps on the src pad, which
* will force negotiation in the chain function. */
res = gst_pad_alloc_buffer (trans->srcpad, offset, size, caps, buf);
} else {
/* ...by letting the default handler create a buffer */
res = GST_FLOW_OK;
}
goto done;
}
}