summaryrefslogtreecommitdiffstats
path: root/gst-libs/gst/audio
diff options
context:
space:
mode:
Diffstat (limited to 'gst-libs/gst/audio')
-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;