summaryrefslogtreecommitdiffstats
path: root/gst-libs
diff options
context:
space:
mode:
authorBenjamin Otte <otte@gnome.org>2004-10-28 02:33:48 +0000
committerBenjamin Otte <otte@gnome.org>2004-10-28 02:33:48 +0000
commit9f6a8d8654888b6c6facee6393deabf924390c05 (patch)
tree6bab8f1ead6197a571deadeba23ea011c60bc059 /gst-libs
parent2e24ea34a910ea413b439e5b075103447402d321 (diff)
downloadgst-plugins-bad-9f6a8d8654888b6c6facee6393deabf924390c05.tar.gz
gst-plugins-bad-9f6a8d8654888b6c6facee6393deabf924390c05.tar.bz2
gst-plugins-bad-9f6a8d8654888b6c6facee6393deabf924390c05.zip
gst-libs/gst/audio/gstaudiofilter.c: fix link function to always query channels and query width for floats
Original commit message from CVS: * gst-libs/gst/audio/gstaudiofilter.c: (gst_audiofilter_link): fix link function to always query channels and query width for floats * configure.ac: add equalizer dir * gst/equalizer/Makefile.am: * gst/equalizer/gstiirequalizer.c: (gst_iir_equalizer_get_type), (gst_iir_equalizer_base_init), (gst_iir_equalizer_class_init), (gst_iir_equalizer_init), (gst_iir_equalizer_finalize), (arg_to_scale), (setup_filter), (gst_iir_equalizer_compute_frequencies), (gst_iir_equalizer_set_property), (gst_iir_equalizer_get_property), (gst_iir_equalizer_filter_inplace), (gst_iir_equalizer_setup), (plugin_init): add an equalizer
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/audio/gstaudiofilter.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gst-libs/gst/audio/gstaudiofilter.c b/gst-libs/gst/audio/gstaudiofilter.c
index 0666862c..da0064d3 100644
--- a/gst-libs/gst/audio/gstaudiofilter.c
+++ b/gst-libs/gst/audio/gstaudiofilter.c
@@ -141,15 +141,17 @@ gst_audiofilter_link (GstPad * pad, const GstCaps * caps)
if (strcmp (gst_structure_get_name (structure), "audio/x-raw-int") == 0) {
ret = gst_structure_get_int (structure, "depth", &audiofilter->depth);
ret &= gst_structure_get_int (structure, "width", &audiofilter->width);
- ret &=
- gst_structure_get_int (structure, "channels", &audiofilter->channels);
} else if (strcmp (gst_structure_get_name (structure), "audio/x-raw-float")
== 0) {
-
+ ret &= gst_structure_get_int (structure, "width", &audiofilter->width);
} else {
g_assert_not_reached ();
}
ret &= gst_structure_get_int (structure, "rate", &audiofilter->rate);
+ ret &= gst_structure_get_int (structure, "channels", &audiofilter->channels);
+
+ if (!ret)
+ return GST_PAD_LINK_REFUSED;
audiofilter->bytes_per_sample = (audiofilter->width / 8) *
audiofilter->channels;