mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 15:27:07 +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
f349fb3810
commit
f12aed235d
1 changed files with 6 additions and 4 deletions
|
@ -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