mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 23:58:17 +00:00
libs/gst/base/gstbasetransform.c: Clear the output buffer variable.
Original commit message from CVS: * 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.
This commit is contained in:
parent
5357a24dbf
commit
8d871b9c1d
2 changed files with 26 additions and 5 deletions
|
@ -1,3 +1,12 @@
|
|||
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):
|
||||
|
|
|
@ -1074,6 +1074,8 @@ gst_base_transform_prepare_output_buffer (GstBaseTransform * trans,
|
|||
|
||||
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");
|
||||
|
@ -1863,15 +1865,25 @@ gst_base_transform_getrange (GstPad * pad, guint64 offset,
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue