From 288596b7a254a748308cb196d5a9311e3f63e401 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Laignel?= Date: Fri, 1 Feb 2019 15:18:50 +0100 Subject: [PATCH] Update transform_caps signature See !223 --- gst-plugin-tutorial/src/rgb2gray.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gst-plugin-tutorial/src/rgb2gray.rs b/gst-plugin-tutorial/src/rgb2gray.rs index bd3b5b02..de51082a 100644 --- a/gst-plugin-tutorial/src/rgb2gray.rs +++ b/gst-plugin-tutorial/src/rgb2gray.rs @@ -309,7 +309,7 @@ impl BaseTransformImpl for Rgb2Gray { direction: gst::PadDirection, caps: &gst::Caps, filter: Option<&gst::Caps>, - ) -> gst::Caps { + ) -> Option { let other_caps = if direction == gst::PadDirection::Src { // For src to sink, no matter if we get asked for BGRx or GRAY8 caps, we can only // accept corresponding BGRx caps on the sinkpad. We will only ever get BGRx and GRAY8 @@ -354,9 +354,9 @@ impl BaseTransformImpl for Rgb2Gray { // In the end we need to filter the caps through an optional filter caps to get rid of any // unwanted caps. if let Some(filter) = filter { - filter.intersect_with_mode(&other_caps, gst::CapsIntersectMode::First) + Some(filter.intersect_with_mode(&other_caps, gst::CapsIntersectMode::First)) } else { - other_caps + Some(other_caps) } }