mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-02 13:38:48 +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>
|
2006-08-16 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
* sys/oss/gstossmixerelement.c: (gst_oss_mixer_element_class_init),
|
* sys/oss/gstossmixerelement.c: (gst_oss_mixer_element_class_init),
|
||||||
|
|
|
@ -602,8 +602,6 @@ gst_signal_processor_flush (GstSignalProcessor * self)
|
||||||
{
|
{
|
||||||
GList *pads;
|
GList *pads;
|
||||||
|
|
||||||
pads = GST_ELEMENT (self)->pads;
|
|
||||||
|
|
||||||
for (pads = GST_ELEMENT (self)->pads; pads; pads = pads->next) {
|
for (pads = GST_ELEMENT (self)->pads; pads; pads = pads->next) {
|
||||||
GstSignalProcessorPad *spad = (GstSignalProcessorPad *) pads->data;
|
GstSignalProcessorPad *spad = (GstSignalProcessorPad *) pads->data;
|
||||||
|
|
||||||
|
@ -708,6 +706,7 @@ gst_signal_processor_do_pushes (GstSignalProcessor * self)
|
||||||
for (; srcpads; srcpads = srcpads->next) {
|
for (; srcpads; srcpads = srcpads->next) {
|
||||||
GstSignalProcessorPad *spad = (GstSignalProcessorPad *) srcpads->data;
|
GstSignalProcessorPad *spad = (GstSignalProcessorPad *) srcpads->data;
|
||||||
GstFlowReturn ret = GST_FLOW_OK;
|
GstFlowReturn ret = GST_FLOW_OK;
|
||||||
|
GstBuffer *buffer;
|
||||||
|
|
||||||
if (!spad->pen) {
|
if (!spad->pen) {
|
||||||
g_warning ("Unexpectedly empty buffer pen for pad %s:%s",
|
g_warning ("Unexpectedly empty buffer pen for pad %s:%s",
|
||||||
|
@ -715,14 +714,17 @@ gst_signal_processor_do_pushes (GstSignalProcessor * self)
|
||||||
continue;
|
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) {
|
if (ret != GST_FLOW_OK) {
|
||||||
self->flow_state = ret;
|
self->flow_state = ret;
|
||||||
gst_signal_processor_flush (self);
|
gst_signal_processor_flush (self);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
spad->pen = NULL;
|
|
||||||
g_assert (self->pending_out > 0);
|
g_assert (self->pending_out > 0);
|
||||||
self->pending_out--;
|
self->pending_out--;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue