From 5cb610d2987bbce4ecb960b7b0486b22a09060e4 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Sat, 17 May 2003 20:39:34 +0000 Subject: [PATCH] make filtered connections actually work. Remove a leftover g_print Original commit message from CVS: make filtered connections actually work. Remove a leftover g_print --- ext/alsa/gstalsa.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ext/alsa/gstalsa.c b/ext/alsa/gstalsa.c index 633af04b06..a0d4cb6553 100644 --- a/ext/alsa/gstalsa.c +++ b/ext/alsa/gstalsa.c @@ -1003,8 +1003,8 @@ gst_alsa_adjust_rate (gint rate, gboolean aggressive) if (aggressive) return rate; - for (i = 0; i < G_N_ELEMENTS (rates); i--) { - if (rate > rates[i]) + for (i = 0; i < G_N_ELEMENTS (rates); i++) { + if (rate >= rates[i]) return rates[i]; } @@ -1067,9 +1067,9 @@ gst_alsa_src_set_caps (GstAlsaSrc *src, gboolean aggressive) gst_caps_set (caps, "rate", GST_PROPS_INT (rate)); for (channels = aggressive ? max_channels : MIN (max_channels, 2); channels >= min_channels; channels--) { gst_caps_set (caps, "channels", GST_PROPS_INT (channels)); - g_print ("trying new caps: law %d, %ssigned, endianness: %d, width %d, depth %d, channels %d, rate %d\n", - law, sign ? "" : "un", endian, width, depth, channels, rate); - if (gst_pad_try_set_caps (this->pad[0], caps)) + GST_DEBUG (0, "trying new caps: law %d, %ssigned, endianness: %d, width %d, depth %d, channels %d, rate %d\n", + law, sign ? "" : "un", endian, width, depth, channels, rate); + if (gst_pad_try_set_caps (this->pad[0], caps) != GST_PAD_LINK_REFUSED) gst_alsa_link (this->pad[0], caps); if (this->format) { -- 2.34.1