From 55455061824f268004aa04597a776cf77292edd2 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Thu, 29 Apr 2004 23:45:03 +0000 Subject: sys/oss/gstosselement.c: Add a check for a driver bug on FreeBSD. (bug #140565) Original commit message from CVS: * sys/oss/gstosselement.c: (gst_osselement_rate_probe_check): Add a check for a driver bug on FreeBSD. (bug #140565) --- sys/oss/gstosselement.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'sys') diff --git a/sys/oss/gstosselement.c b/sys/oss/gstosselement.c index 4253a0f9..a990c22c 100644 --- a/sys/oss/gstosselement.c +++ b/sys/oss/gstosselement.c @@ -1168,6 +1168,17 @@ gst_osselement_rate_probe_check (GstOssProbe * probe) probe->min = gst_osselement_rate_check_rate (probe, 1000); n_checks++; probe->max = gst_osselement_rate_check_rate (probe, 100000); + /* a little bug workaround */ + { + int max; + + max = gst_osselement_rate_check_rate (probe, 48000); + if (max > probe->max) { + GST_ERROR + ("Driver bug recognized (driver does not round rates correctly). Please file a bug report."); + probe->max = max; + } + } n_checks++; if (probe->min == -1 || probe->max == -1) { GST_DEBUG ("unexpected check_rate error"); -- cgit