From 71dd5182f3b5e4db6b8ede5d0b37c6935c3fdf3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Chanal?= Date: Fri, 25 Mar 2022 10:18:34 +0100 Subject: [PATCH] Drop NdiSrcMeta after ndisrcdemux The NdiSrcMeta is no longer needed after the demux and if kept, it generates many errors as the transform_func() always false. --- src/ndisrcdemux/imp.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ndisrcdemux/imp.rs b/src/ndisrcdemux/imp.rs index 67b38d799..47ca9c5d3 100644 --- a/src/ndisrcdemux/imp.rs +++ b/src/ndisrcdemux/imp.rs @@ -147,11 +147,11 @@ impl NdiSrcDemux { &self, pad: &gst::Pad, element: &super::NdiSrcDemux, - buffer: gst::Buffer, + mut buffer: gst::Buffer, ) -> Result { gst_log!(CAT, obj: pad, "Handling buffer {:?}", buffer); - let meta = buffer.meta::().ok_or_else(|| { + let meta = buffer.make_mut().meta_mut::().ok_or_else(|| { gst_error!(CAT, obj: element, "Buffer without NDI source meta"); gst::FlowError::Error })?; @@ -265,6 +265,7 @@ impl NdiSrcDemux { } } drop(state); + meta.remove().unwrap(); if add_pad { element.add_pad(&srcpad).unwrap();