Antonio Larrosa
fbefc6da12
- Update to 0.6.0+git20210412.c3fb55f - Add patch to fix build in the i586 architecture (Submitted in glfo#gstreamer/gst-plugins-rs#502): * 0001-Fix-cast-to-f64-so-it-builds-in-i586.patch OBS-URL: https://build.opensuse.org/request/show/886891 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/gstreamer-plugins-rs?expand=0&rev=5
38 lines
1.4 KiB
Diff
38 lines
1.4 KiB
Diff
From 9f39c3276e2d9a373e80a83ef127527bfff8f1f7 Mon Sep 17 00:00:00 2001
|
|
From: Antonio Larrosa <antonio.larrosa@gmail.com>
|
|
Date: Tue, 20 Apr 2021 07:35:59 +0200
|
|
Subject: [PATCH] Fix cast to f64 so it builds in i586
|
|
|
|
For some reason (compiler bug?), the rust compiler fails to compare
|
|
u32 and f64 types on i586 with the following error:
|
|
|
|
error[E0282]: type annotations needed
|
|
--> audio/csound/src/filter/imp.rs:611:47
|
|
|
|
|
611 | if rate != out_info.rate() || rate != csound.get_sample_rate() as _ {
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type
|
|
|
|
|
= note: type must be known at this point
|
|
|
|
Using an explicit cast solves the issue.
|
|
---
|
|
audio/csound/src/filter/imp.rs | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/audio/csound/src/filter/imp.rs b/audio/csound/src/filter/imp.rs
|
|
index 9ab2292..3059ccb 100644
|
|
--- a/audio/csound/src/filter/imp.rs
|
|
+++ b/audio/csound/src/filter/imp.rs
|
|
@@ -608,7 +608,7 @@ impl BaseTransformImpl for CsoundFilter {
|
|
let rate = in_info.rate();
|
|
|
|
// Check if the negotiated caps are the right ones
|
|
- if rate != out_info.rate() || rate != csound.get_sample_rate() as _ {
|
|
+ if rate != out_info.rate() || rate as f64 != csound.get_sample_rate() {
|
|
return Err(loggable_error!(
|
|
CAT,
|
|
"Failed to negotiate caps: invalid sample rate {}",
|
|
--
|
|
2.31.1
|
|
|