From 7d77858bc8ab186f27e791b5271fd079d6cd1ceb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 3 Nov 2023 11:48:23 +0200 Subject: [PATCH] gstreamer: meta: Give returned tags array an arbitrary lifetime The tags are statically stored. Part-of: --- gstreamer/src/meta.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gstreamer/src/meta.rs b/gstreamer/src/meta.rs index 2bc4efa01..e309ceaef 100644 --- a/gstreamer/src/meta.rs +++ b/gstreamer/src/meta.rs @@ -204,7 +204,7 @@ impl<'a, T> MetaRef<'a, T> { #[inline] #[doc(alias = "gst_meta_api_type_get_tags")] - pub fn tags(&self) -> &[glib::GStringPtr] { + pub fn tags<'b>(&self) -> &'b [glib::GStringPtr] { unsafe { glib::StrV::from_glib_borrow(ffi::gst_meta_api_type_get_tags(self.api().into_glib())) } @@ -304,7 +304,7 @@ impl<'a, T, U> MetaRefMut<'a, T, U> { #[inline] #[doc(alias = "gst_meta_api_type_get_tags")] - pub fn tags(&self) -> &[glib::GStringPtr] { + pub fn tags<'b>(&self) -> &'b [glib::GStringPtr] { unsafe { glib::StrV::from_glib_borrow(ffi::gst_meta_api_type_get_tags(self.api().into_glib())) }