video/gtk4: Remove some indentation in frame.rs

We have less cfg features now and don't need the extra
brackets to guard the codepaths.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1708>
This commit is contained in:
Jordan Petridis 2024-08-12 19:29:32 +03:00 committed by GStreamer Marge Bot
parent 602760d0d8
commit ff5032934d

View file

@ -536,7 +536,6 @@ impl Frame {
#[allow(unused_mut)] #[allow(unused_mut)]
let mut frame = None; let mut frame = None;
{
// Check we received a buffer with dmabuf memory and if so do some checks before // Check we received a buffer with dmabuf memory and if so do some checks before
// passing it onwards // passing it onwards
#[cfg(all(target_os = "linux", feature = "dmabuf"))] #[cfg(all(target_os = "linux", feature = "dmabuf"))]
@ -592,7 +591,6 @@ impl Frame {
} }
} }
{
if frame.is_none() { if frame.is_none() {
// Check we received a buffer with GL memory and if the context of that memory // Check we received a buffer with GL memory and if the context of that memory
// can share with the wrapped context around the GDK GL context. // can share with the wrapped context around the GDK GL context.
@ -603,8 +601,7 @@ impl Frame {
.downcast_memory_ref::<gst_gl::GLBaseMemory>() .downcast_memory_ref::<gst_gl::GLBaseMemory>()
.and_then(|m| { .and_then(|m| {
let ctx = m.context(); let ctx = m.context();
if wrapped_context if wrapped_context.is_some_and(|wrapped_context| wrapped_context.can_share(ctx))
.is_some_and(|wrapped_context| wrapped_context.can_share(ctx))
{ {
Some(ctx) Some(ctx)
} else { } else {
@ -641,8 +638,6 @@ impl Frame {
}); });
} }
} }
}
}
let mut frame = Self { let mut frame = Self {
frame: match frame { frame: match frame {