Commit 1e4efaf6 authored by Wim Taymans's avatar Wim Taymans
Browse files

ext/ladspa/gstsignalprocessor.c: A push() gives away our refcount so we should...

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.
parent 26091ec5
2006-08-16 Wim Taymans <wim@fluendo.com>
* 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.
2006-08-16 Tim-Philipp Müller <tim at centricular dot net>
* sys/oss/gstossmixerelement.c: (gst_oss_mixer_element_class_init),
......
......@@ -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--;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment