diff options
author | Stefan Kost <ensonic@users.sourceforge.net> | 2006-07-31 19:44:18 +0000 |
---|---|---|
committer | Stefan Kost <ensonic@users.sourceforge.net> | 2006-07-31 19:44:18 +0000 |
commit | f05aaeac15e16edd009b4d7ca1c80d46aaa73d85 (patch) | |
tree | d0bd3f09bd5682a6a08443958fc74c75f358e73f | |
parent | d3b76b0583aaac18540b42459c680f252f6621ba (diff) | |
download | gst-plugins-bad-f05aaeac15e16edd009b4d7ca1c80d46aaa73d85.tar.gz gst-plugins-bad-f05aaeac15e16edd009b4d7ca1c80d46aaa73d85.tar.bz2 gst-plugins-bad-f05aaeac15e16edd009b4d7ca1c80d46aaa73d85.zip |
ext/ladspa/gstsignalprocessor.c: don't query buffer-frames from caps, add lots of debug-log, try fix for assert (#349...
Original commit message from CVS:
* ext/ladspa/gstsignalprocessor.c: (gst_signal_processor_setcaps),
(gst_signal_processor_process):
don't query buffer-frames from caps, add lots of debug-log,
try fix for assert (#349189)
-rw-r--r-- | ext/ladspa/gstsignalprocessor.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/ext/ladspa/gstsignalprocessor.c b/ext/ladspa/gstsignalprocessor.c index ac86461d..8af3db99 100644 --- a/ext/ladspa/gstsignalprocessor.c +++ b/ext/ladspa/gstsignalprocessor.c @@ -272,27 +272,19 @@ gst_signal_processor_setcaps (GstPad * pad, GstCaps * caps) /* FIXME: why this? */ if (caps != self->caps) { GstStructure *s; - gint sample_rate, buffer_frames; + gint sample_rate; s = gst_caps_get_structure (caps, 0); if (!gst_structure_get_int (s, "rate", &sample_rate)) { GST_WARNING ("got no sample-rate"); return FALSE; - } else + } else { + GST_DEBUG ("Got rate=%d", self->sample_rate); self->sample_rate = sample_rate; - if (!gst_structure_get_int (s, "buffer-frames", &buffer_frames)) { - GST_WARNING ("got no buffer-frames"); - /* FIXME: this is not critical - return FALSE; - */ - } else - self->buffer_frames = buffer_frames; + } if (!klass->setup (self, sample_rate)) return FALSE; - - GST_DEBUG ("Got rate=%d, buffer-frames=%d", self->sample_rate, - self->buffer_frames); } else { GST_DEBUG ("skipping, have caps already"); } @@ -381,6 +373,9 @@ gst_signal_processor_process (GstSignalProcessor * self) klass->process (self, self->buffer_frames); + self->pending_in = klass->num_audio_in; + GST_DEBUG ("pending in=%d, out=%d", self->pending_in, self->pending_out); + /* free unneeded input buffers */ for (l1 = elem->sinkpads; l1; l1 = l1->next) { |