summaryrefslogtreecommitdiff
path: root/sys/oss
diff options
context:
space:
mode:
authorBenjamin Otte <otte@gnome.org>2004-03-30 18:01:45 +0000
committerBenjamin Otte <otte@gnome.org>2004-03-30 18:01:45 +0000
commit0941bfb00ea1d8b28d242ecd9963792a583bdafd (patch)
treece8b125301dbbfe035dad6c42deaeded1fad6c9d /sys/oss
parentba2e37392793a6b6b2bed9c1e14fa8e30e2bc76e (diff)
sys/oss/gstosselement.c: probe caps correctly for sound cards that only support one format
Original commit message from CVS: * sys/oss/gstosselement.c: (gst_osselement_probe_caps), (gst_osselement_rate_check_rate): probe caps correctly for sound cards that only support one format
Diffstat (limited to 'sys/oss')
-rw-r--r--sys/oss/gstosselement.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/oss/gstosselement.c b/sys/oss/gstosselement.c
index 78215d57d..035398256 100644
--- a/sys/oss/gstosselement.c
+++ b/sys/oss/gstosselement.c
@@ -1038,7 +1038,7 @@ gst_osselement_probe_caps (GstOssElement * oss)
caps = gst_caps_new_empty ();
/* assume that the most significant bit of format_mask is 0 */
- for (format_bit = 1; format_bit < format_mask; format_bit <<= 1) {
+ for (format_bit = 1; format_bit <= format_mask; format_bit <<= 1) {
if (format_bit & format_mask) {
GValue rate_value = { 0 };
@@ -1257,6 +1257,8 @@ gst_osselement_rate_check_rate (GstOssProbe * probe, int irate)
format = probe->format;
n_channels = probe->n_channels;
+ GST_LOG ("checking format %d, channels %d, rate %d",
+ format, n_channels, rate);
ret = ioctl (probe->fd, SNDCTL_DSP_SETFMT, &format);
if (ret < 0)
return -1;