summaryrefslogtreecommitdiffstats
path: root/ext/ladspa
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2006-08-16 14:47:50 +0000
committerWim Taymans <wim.taymans@gmail.com>2006-08-16 14:47:50 +0000
commitf12aed235df8955b6e0f05c3c96b5c12b717e051 (patch)
treeee3958b3c8f102f7c7790ff8b230ec5e4990a5e1 /ext/ladspa
parentf349fb381066e316a38e3a068cb287ce36684a5f (diff)
downloadgst-plugins-bad-f12aed235df8955b6e0f05c3c96b5c12b717e051.tar.gz
gst-plugins-bad-f12aed235df8955b6e0f05c3c96b5c12b717e051.tar.bz2
gst-plugins-bad-f12aed235df8955b6e0f05c3c96b5c12b717e051.zip
ext/ladspa/gstsignalprocessor.c: A push() gives away our refcount so we should not use the buffer on the pen anymore.
Original commit message from CVS: * ext/ladspa/gstsignalprocessor.c: (gst_signal_processor_flush), (gst_signal_processor_do_pushes): A push() gives away our refcount so we should not use the buffer on the pen anymore.
Diffstat (limited to 'ext/ladspa')
-rw-r--r--ext/ladspa/gstsignalprocessor.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/ext/ladspa/gstsignalprocessor.c b/ext/ladspa/gstsignalprocessor.c
index 2d835416..41fe4e1e 100644
--- a/ext/ladspa/gstsignalprocessor.c
+++ b/ext/ladspa/gstsignalprocessor.c
@@ -602,8 +602,6 @@ gst_signal_processor_flush (GstSignalProcessor * self)
{
GList *pads;
- pads = GST_ELEMENT (self)->pads;
-
for (pads = GST_ELEMENT (self)->pads; pads; pads = pads->next) {
GstSignalProcessorPad *spad = (GstSignalProcessorPad *) pads->data;
@@ -708,6 +706,7 @@ gst_signal_processor_do_pushes (GstSignalProcessor * self)
for (; srcpads; srcpads = srcpads->next) {
GstSignalProcessorPad *spad = (GstSignalProcessorPad *) srcpads->data;
GstFlowReturn ret = GST_FLOW_OK;
+ GstBuffer *buffer;
if (!spad->pen) {
g_warning ("Unexpectedly empty buffer pen for pad %s:%s",
@@ -715,14 +714,17 @@ gst_signal_processor_do_pushes (GstSignalProcessor * self)
continue;
}
- ret = gst_pad_push (GST_PAD (spad), spad->pen);
+ /* take buffer from pen */
+ buffer = spad->pen;
+ spad->pen = NULL;
+
+ ret = gst_pad_push (GST_PAD (spad), buffer);
if (ret != GST_FLOW_OK) {
self->flow_state = ret;
gst_signal_processor_flush (self);
return;
} else {
- spad->pen = NULL;
g_assert (self->pending_out > 0);
self->pending_out--;
}