mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-01 20:12:28 +00:00
ext/ladspa/gstsignalprocessor.c: Reset flow_state back to _OK after a flush stop so that we exit our error state afte...
Original commit message from CVS: * ext/ladspa/gstsignalprocessor.c: (gst_signal_processor_setcaps), (gst_signal_processor_event): Reset flow_state back to _OK after a flush stop so that we exit our error state after the flush. Fixes #374213
This commit is contained in:
parent
5c63981e41
commit
3abb0f8d67
2 changed files with 25 additions and 7 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2006-12-18 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
|
* ext/ladspa/gstsignalprocessor.c: (gst_signal_processor_setcaps),
|
||||||
|
(gst_signal_processor_event):
|
||||||
|
Reset flow_state back to _OK after a flush stop so that we exit our
|
||||||
|
error state after the flush. Fixes #374213
|
||||||
|
|
||||||
2006-12-16 David Schleef <ds@schleef.org>
|
2006-12-16 David Schleef <ds@schleef.org>
|
||||||
|
|
||||||
* sys/osxvideo/osxvideosink.h:
|
* sys/osxvideo/osxvideosink.h:
|
||||||
|
|
|
@ -382,25 +382,26 @@ gst_signal_processor_setcaps (GstPad * pad, GstCaps * caps)
|
||||||
GstStructure *s;
|
GstStructure *s;
|
||||||
gint sample_rate;
|
gint sample_rate;
|
||||||
|
|
||||||
|
GST_DEBUG_OBJECT (pad, "got caps %" GST_PTR_FORMAT, caps);
|
||||||
|
|
||||||
s = gst_caps_get_structure (caps, 0);
|
s = gst_caps_get_structure (caps, 0);
|
||||||
if (!gst_structure_get_int (s, "rate", &sample_rate)) {
|
if (!gst_structure_get_int (s, "rate", &sample_rate)) {
|
||||||
GST_WARNING ("got no sample-rate");
|
GST_WARNING ("got no sample-rate");
|
||||||
goto impossible;
|
goto impossible;
|
||||||
} else {
|
|
||||||
GST_DEBUG_OBJECT (self, "Got rate=%d", sample_rate);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GST_DEBUG_OBJECT (self, "Got rate=%d", sample_rate);
|
||||||
|
|
||||||
if (GST_SIGNAL_PROCESSOR_IS_RUNNING (self))
|
if (GST_SIGNAL_PROCESSOR_IS_RUNNING (self))
|
||||||
gst_signal_processor_stop (self);
|
gst_signal_processor_stop (self);
|
||||||
if (GST_SIGNAL_PROCESSOR_IS_INITIALIZED (self))
|
if (GST_SIGNAL_PROCESSOR_IS_INITIALIZED (self))
|
||||||
gst_signal_processor_cleanup (self);
|
gst_signal_processor_cleanup (self);
|
||||||
|
|
||||||
if (!gst_signal_processor_setup (self, sample_rate)) {
|
if (!gst_signal_processor_setup (self, sample_rate))
|
||||||
goto start_failed;
|
goto start_failed;
|
||||||
} else {
|
|
||||||
self->sample_rate = sample_rate;
|
self->sample_rate = sample_rate;
|
||||||
gst_caps_replace (&self->caps, caps);
|
gst_caps_replace (&self->caps, caps);
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
GST_DEBUG_OBJECT (self, "skipping, have caps already");
|
GST_DEBUG_OBJECT (self, "skipping, have caps already");
|
||||||
}
|
}
|
||||||
|
@ -449,6 +450,16 @@ gst_signal_processor_event (GstPad * pad, GstEvent * event)
|
||||||
if (bclass->event)
|
if (bclass->event)
|
||||||
bclass->event (self, event);
|
bclass->event (self, event);
|
||||||
|
|
||||||
|
switch (GST_EVENT_TYPE (event)) {
|
||||||
|
case GST_EVENT_FLUSH_START:
|
||||||
|
break;
|
||||||
|
case GST_EVENT_FLUSH_STOP:
|
||||||
|
/* clear errors now */
|
||||||
|
self->flow_state = GST_FLOW_OK;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
ret = gst_pad_event_default (pad, event);
|
ret = gst_pad_event_default (pad, event);
|
||||||
|
|
||||||
gst_object_unref (self);
|
gst_object_unref (self);
|
||||||
|
|
Loading…
Reference in a new issue