mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-12-22 18:16:28 +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/1837>
This commit is contained in:
parent
867408b1c0
commit
d1254fc4ef
1 changed files with 7 additions and 9 deletions
|
@ -742,15 +742,13 @@ 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)| {
|
!features.contains(gst_allocators::CAPS_FEATURE_MEMORY_DMABUF)
|
||||||
!features.contains(gst_allocators::CAPS_FEATURE_MEMORY_DMABUF)
|
})
|
||||||
})
|
.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() {
|
||||||
|
|
Loading…
Reference in a new issue