+2008-10-24 Wim Taymans <wim.taymans@collabora.co.uk>
+
+ * libs/gst/base/gstbasetransform.c:
+ (gst_base_transform_prepare_output_buffer),
+ (gst_base_transform_getrange):
+ Clear the output buffer variable.
+ Cleanups to the error path in the getrange function.
+ Fixes #557649.
+
2008-10-23 Sebastian Dröge <slomo@circular-chaos.org>
* plugins/elements/gstfdsrc.c: (gst_fd_src_create):
priv = trans->priv;
+ *out_buf = NULL;
+
/* figure out how to allocate a buffer based on the current configuration */
if (trans->passthrough) {
GST_DEBUG_OBJECT (trans, "doing passthrough alloc");
trans = GST_BASE_TRANSFORM (gst_pad_get_parent (pad));
ret = gst_pad_pull_range (trans->sinkpad, offset, length, &inbuf);
- if (ret == GST_FLOW_OK) {
- GST_BASE_TRANSFORM_LOCK (trans);
- ret = gst_base_transform_handle_buffer (trans, inbuf, buffer);
- GST_BASE_TRANSFORM_UNLOCK (trans);
- }
+ if (G_UNLIKELY (ret != GST_FLOW_OK))
+ goto pull_error;
+ GST_BASE_TRANSFORM_LOCK (trans);
+ ret = gst_base_transform_handle_buffer (trans, inbuf, buffer);
+ GST_BASE_TRANSFORM_UNLOCK (trans);
+
+done:
gst_object_unref (trans);
return ret;
+
+ /* ERRORS */
+pull_error:
+ {
+ GST_DEBUG_OBJECT (trans, "failed to pull a buffer: %s",
+ gst_flow_get_name (ret));
+ goto done;
+ }
}
static GstFlowReturn