mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-30 12:10:37 +00:00
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.
This commit is contained in:
parent
26091ec5ec
commit
1e4efaf684
2 changed files with 13 additions and 4 deletions
|
@ -1,3 +1,10 @@
|
|||
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--;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue