summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2006-07-31 22:27:22 +0000
committerAndy Wingo <wingo@pobox.com>2006-07-31 22:27:22 +0000
commitc98740d77a0d1d57144cf7b1eee37a31ffabd082 (patch)
tree649235cb1d7457001f34116eeb9411edaadeb0c6 /ext
parent199ffb130fa0a40c5343b363c169f8c70acf4ec3 (diff)
downloadgst-plugins-bad-c98740d77a0d1d57144cf7b1eee37a31ffabd082.tar.gz
gst-plugins-bad-c98740d77a0d1d57144cf7b1eee37a31ffabd082.tar.bz2
gst-plugins-bad-c98740d77a0d1d57144cf7b1eee37a31ffabd082.zip
ext/ladspa/gstsignalprocessor.c (gst_signal_processor_process): Fix nframes-choosing.
Original commit message from CVS: 2006-08-01 Andy Wingo <wingo@pobox.com> * ext/ladspa/gstsignalprocessor.c (gst_signal_processor_process): Fix nframes-choosing. (gst_signal_processor_init): Init pending_in and pending_out.
Diffstat (limited to 'ext')
-rw-r--r--ext/ladspa/gstsignalprocessor.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/ext/ladspa/gstsignalprocessor.c b/ext/ladspa/gstsignalprocessor.c
index f24dd50f..884bb1e5 100644
--- a/ext/ladspa/gstsignalprocessor.c
+++ b/ext/ladspa/gstsignalprocessor.c
@@ -237,6 +237,10 @@ gst_signal_processor_init (GstSignalProcessor * self,
self->audio_out = g_new0 (gfloat *, klass->num_audio_out);
self->control_out = g_new0 (gfloat, klass->num_control_out);
+ /* init */
+ self->pending_in = klass->num_audio_in;
+ self->pending_out = 0;
+
self->sample_rate = 0;
}
@@ -348,8 +352,11 @@ gst_signal_processor_process (GstSignalProcessor * self)
l1 = l1 ? l1->next : NULL, l2 = l2 ? l2->next : NULL) {
GstSignalProcessorPad *srcpad, *sinkpad;
- if (l1)
- nframes = MIN (nframes, GST_BUFFER_SIZE (l1->data) / sizeof (gfloat));
+ if (l1) {
+ GstSignalProcessorPad *tmp = (GstSignalProcessorPad *) l1->data;
+
+ nframes = MIN (nframes, GST_BUFFER_SIZE (tmp->pen) / sizeof (gfloat));
+ }
if (!l2) {
/* the output buffers have been covered, yay -- just keep looping to check
@@ -395,6 +402,8 @@ gst_signal_processor_process (GstSignalProcessor * self)
klass = GST_SIGNAL_PROCESSOR_GET_CLASS (self);
+ GST_INFO_OBJECT (self, "process(%u)", nframes);
+
klass->process (self, nframes);
/* reset */