gtk4paintablesink: Don't check for a GL context when filtering dmabuf caps

There's no connection between the two and dmabuf can also not be
supported if GL is also unsupported.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1837>
This commit is contained in:
Sebastian Dröge 2024-10-02 16:52:12 +03:00 committed by GStreamer Marge Bot
parent 867408b1c0
commit d1254fc4ef

View file

@ -742,7 +742,6 @@ impl PaintableSink {
if formats.is_empty() { if formats.is_empty() {
// Filter out dmabufs caps from the template pads if we have no supported formats // Filter out dmabufs caps from the template pads if we have no supported formats
if !matches!(&*GL_CONTEXT.lock().unwrap(), GLContext::Initialized { .. }) {
tmp_caps = tmp_caps tmp_caps = tmp_caps
.iter_with_features() .iter_with_features()
.filter(|(_, features)| { .filter(|(_, features)| {
@ -750,7 +749,6 @@ impl PaintableSink {
}) })
.map(|(s, c)| (s.to_owned(), c.to_owned())) .map(|(s, c)| (s.to_owned(), c.to_owned()))
.collect::<gst::Caps>(); .collect::<gst::Caps>();
}
} else { } else {
let tmp_caps = tmp_caps.make_mut(); let tmp_caps = tmp_caps.make_mut();
for (s, f) in tmp_caps.iter_with_features_mut() { for (s, f) in tmp_caps.iter_with_features_mut() {