$OpenBSD: patch-sys_oss_gstosshelper_c,v 1.3 2008/06/14 17:17:26 deanna Exp $
--- sys/oss/gstosshelper.c.orig	Tue Apr  8 15:49:34 2008
+++ sys/oss/gstosshelper.c	Fri Jun 13 11:06:46 2008
@@ -227,6 +227,7 @@ gst_oss_helper_rate_probe_check (GstOssProbe * probe)
   int exact_rates = 0;
   gboolean checking_exact_rates = TRUE;
   int n_checks = 0;
+  int max_exact_matches = 20;
   gboolean result = TRUE;
 
   ranges = g_queue_new ();
@@ -254,6 +255,12 @@ gst_oss_helper_rate_probe_check (GstOssProbe * probe)
      * driver is seriously buggy, and probably doesn't work with other
      * media libraries/apps.  */
     probe->min = gst_oss_helper_rate_check_rate (probe, 8000);
+    if (probe->min == -1)
+        probe->min = gst_oss_helper_rate_check_rate (probe, 32000);
+    if (probe->min == -1)
+        probe->min = gst_oss_helper_rate_check_rate (probe, 44100);
+    if (probe->min == -1)
+        probe->min = gst_oss_helper_rate_check_rate (probe, 48000);
     probe->max = gst_oss_helper_rate_check_rate (probe, 48000);
   }
   if (probe->min == -1 || probe->max == -1) {
@@ -278,19 +285,15 @@ gst_oss_helper_rate_probe_check (GstOssProbe * probe)
     }
     n_checks++;
 
-    if (mid == mid_ret && checking_exact_rates) {
-      int max_exact_matches = 20;
-
+    if (mid == mid_ret && checking_exact_rates)
       exact_rates++;
-      if (exact_rates > max_exact_matches) {
-        GST_DEBUG ("got %d exact rates, assuming all are exact",
-            max_exact_matches);
-        result = FALSE;
-        g_free (range);
-        break;
-      }
-    } else {
-      checking_exact_rates = FALSE;
+
+    if (exact_rates > max_exact_matches) {
+      GST_DEBUG ("got %d exact rates, assuming all are exact",
+		 max_exact_matches);
+      result = FALSE;
+      g_free (range);
+      break;
     }
 
     /* Assume that the rate is arithmetically rounded to the nearest
