make request pads work

Original commit message from CVS:
make request pads work
This commit is contained in:
Andy Wingo 2002-07-16 14:36:53 +00:00
parent 9392c00442
commit 21595d5571

View file

@ -357,18 +357,18 @@ gst_alsa_request_new_pad (GstElement *element, GstPadTemplate *templ, const gcha
}
l = l->next;
}
newname = g_strdup (name);
} else {
l = this->pads;
channel = 0;
while (l) {
if (GST_ALSA_PAD(l)->channel > channel)
channel = GST_ALSA_PAD(l)->channel;
if (GST_ALSA_PAD(l)->channel >= channel)
channel = GST_ALSA_PAD(l)->channel + 1;
l = l->next;
}
newname = g_strdup_printf (templ->name_template, channel);
}
newname = g_strdup (name);
pad = g_new0(GstAlsaPad, 1);
pad->channel = channel;
pad->pad = gst_pad_new_from_template (templ, newname);