From 13dd7366cd958cf9a9177f7e08848b0b9a77ee2d Mon Sep 17 00:00:00 2001 From: David Schleef Date: Sat, 3 Jul 2004 02:54:53 +0000 Subject: gst/wavenc/gstwavenc.c: Switch to GST_WRITE_UINT32_LE macros (bug #144624) Original commit message from CVS: * gst/wavenc/gstwavenc.c: (gst_wavenc_setup), (gst_wavenc_stop_file): Switch to GST_WRITE_UINT32_LE macros (bug #144624) * sys/oss/gstosselement.c: (gst_osselement_probe_caps), (gst_osselement_rate_probe_check): Add another workaround for buggy drivers (bug #145336) --- sys/oss/gstosselement.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'sys') diff --git a/sys/oss/gstosselement.c b/sys/oss/gstosselement.c index 0e57d47f..5d17dfe2 100644 --- a/sys/oss/gstosselement.c +++ b/sys/oss/gstosselement.c @@ -1126,7 +1126,7 @@ gst_osselement_probe_caps (GstOssElement * oss) if (gst_caps_is_empty (caps)) { GST_ELEMENT_ERROR (oss, RESOURCE, SETTINGS, - (_("Your oss device could not be probed correctly")), (NULL)); + (_("Your OSS device could not be probed correctly")), (NULL)); return; } GST_DEBUG ("probed caps: %" GST_PTR_FORMAT, caps); @@ -1217,6 +1217,14 @@ gst_osselement_rate_probe_check (GstOssProbe * probe) } } n_checks++; + if (probe->min == -1 || probe->max == -1) { + /* This is a workaround for drivers that return -EINVAL (or another + * error) for rates outside of [8000,48000]. If this fails, the + * driver is seriously buggy, and probably doesn't work with other + * media libraries/apps. */ + probe->min = gst_osselement_rate_check_rate (probe, 8000); + probe->max = gst_osselement_rate_check_rate (probe, 48000); + } if (probe->min == -1 || probe->max == -1) { GST_DEBUG ("unexpected check_rate error"); return FALSE; -- cgit