Merge pull request #96 from ubifred/master

Drop NdiSrcMeta after ndisrcdemux
This commit is contained in:
Samuel Alonso Rodriguez 2022-03-28 19:11:06 +02:00 committed by GitHub
commit 08b52ffd2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -147,11 +147,11 @@ impl NdiSrcDemux {
&self, &self,
pad: &gst::Pad, pad: &gst::Pad,
element: &super::NdiSrcDemux, element: &super::NdiSrcDemux,
buffer: gst::Buffer, mut buffer: gst::Buffer,
) -> Result<gst::FlowSuccess, gst::FlowError> { ) -> Result<gst::FlowSuccess, gst::FlowError> {
gst_log!(CAT, obj: pad, "Handling buffer {:?}", buffer); gst_log!(CAT, obj: pad, "Handling buffer {:?}", buffer);
let meta = buffer.meta::<ndisrcmeta::NdiSrcMeta>().ok_or_else(|| { let meta = buffer.make_mut().meta_mut::<ndisrcmeta::NdiSrcMeta>().ok_or_else(|| {
gst_error!(CAT, obj: element, "Buffer without NDI source meta"); gst_error!(CAT, obj: element, "Buffer without NDI source meta");
gst::FlowError::Error gst::FlowError::Error
})?; })?;
@ -265,6 +265,7 @@ impl NdiSrcDemux {
} }
} }
drop(state); drop(state);
meta.remove().unwrap();
if add_pad { if add_pad {
element.add_pad(&srcpad).unwrap(); element.add_pad(&srcpad).unwrap();