diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2023-01-19 17:36:37 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2023-01-19 17:36:37 +0300 |
commit | d1196c3e282616dfe70fdf242ab1b407b6a688c2 (patch) | |
tree | 8de26847003fb1f2bc2290d117212ebce6bc8e87 /video | |
parent | 03df4f253cc56bcb3c61df9202991fd6f2094f5b (diff) |
gtk4: Update for allocation query caps API changes
And make no caps into a non-error.
Diffstat (limited to 'video')
-rw-r--r-- | video/gtk4/src/sink/imp.rs | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/video/gtk4/src/sink/imp.rs b/video/gtk4/src/sink/imp.rs index 6c1d3f8e..397fc6bf 100644 --- a/video/gtk4/src/sink/imp.rs +++ b/video/gtk4/src/sink/imp.rs @@ -334,10 +334,15 @@ impl BaseSinkImpl for PaintableSink { // GL specific things let (caps, need_pool) = query.get_owned(); - - if caps.is_empty() { - return Err(gst::loggable_error!(CAT, "No caps where specified.")); - } + let caps = match caps { + None => { + return Ok(()); + } + Some(caps) if caps.is_empty() || caps.is_any() => { + return Ok(()); + } + Some(caps) => caps, + }; if let Some(f) = caps.features(0) { if !f.contains("memory:GLMemory") { |