mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-08 02:05:26 +00:00
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/1842>
This commit is contained in:
parent
9675ead84f
commit
30d2676cbb
1 changed files with 7 additions and 9 deletions
|
@ -655,15 +655,13 @@ impl PaintableSink {
|
|||
|
||||
if formats.is_empty() {
|
||||
// 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
|
||||
.iter_with_features()
|
||||
.filter(|(_, features)| {
|
||||
!features.contains(gst_allocators::CAPS_FEATURE_MEMORY_DMABUF)
|
||||
})
|
||||
.map(|(s, c)| (s.to_owned(), c.to_owned()))
|
||||
.collect::<gst::Caps>();
|
||||
}
|
||||
tmp_caps = tmp_caps
|
||||
.iter_with_features()
|
||||
.filter(|(_, features)| {
|
||||
!features.contains(gst_allocators::CAPS_FEATURE_MEMORY_DMABUF)
|
||||
})
|
||||
.map(|(s, c)| (s.to_owned(), c.to_owned()))
|
||||
.collect::<gst::Caps>();
|
||||
} else {
|
||||
let tmp_caps = tmp_caps.make_mut();
|
||||
for (s, f) in tmp_caps.iter_with_features_mut() {
|
||||
|
|
Loading…
Reference in a new issue