Build failure on macOS likely due to 8aa5125d
8aa5125d changed the signature of initialize_macosgl
to specify a return type of Option<(gst_gl::GLDisplay, gst_gl::GLContext)>
.
This leads to an error here, which calls an unspecified return
.
error[E0069]: `return;` in a function whose return type is not `()`
--> video/gtk4/src/sink/imp.rs:856:21
|
856 | return;
| ^^^^^^ return type is not `()`
For more information about this error, try `rustc --explain E0069`.
This patch seems to fix it:
diff --git a/video/gtk4/src/sink/imp.rs b/video/gtk4/src/sink/imp.rs
index 5a569697..a9789d76 100644
--- a/video/gtk4/src/sink/imp.rs
+++ b/video/gtk4/src/sink/imp.rs
@@ -856,7 +856,7 @@ impl PaintableSink {
let wrapped_context = match wrapped_context {
None => {
gst::error!(CAT, imp: self, "Failed to create wrapped GL context");
- return;
+ return None;
}
Some(wrapped_context) => wrapped_context,
};
I don't really do Rust, so I'm not certain, but the surrounding code suggests that it's the right fix. It does make the build failure go away.
I'd have sent an MR, but the new account restrictions for this GitLab instance prevent me from forking your repo.
Edited by Carlo Cabrera