From ab2dbe0234b1f41009d6b2f239a5775b8af1bc31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 27 Feb 2019 18:04:52 +0200 Subject: [PATCH] sdp: Fix SDPMedia::attributes_to_caps() signature to actually work It has to take a mutable caps reference or otherwise will simply fail. --- gstreamer-sdp/src/sdp_media.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gstreamer-sdp/src/sdp_media.rs b/gstreamer-sdp/src/sdp_media.rs index 8b2d3a9fd..adf6731f5 100644 --- a/gstreamer-sdp/src/sdp_media.rs +++ b/gstreamer-sdp/src/sdp_media.rs @@ -173,10 +173,8 @@ impl SDPMediaRef { unsafe { ffi::gst_sdp_media_attributes_len(&self.0) } } - pub fn attributes_to_caps(&self, caps: &gst::Caps) -> Result<(), ()> { - let result = unsafe { - ffi::gst_sdp_media_attributes_to_caps(&self.0, caps.to_glib_none().0) - }; + pub fn attributes_to_caps(&self, caps: &mut gst::CapsRef) -> Result<(), ()> { + let result = unsafe { ffi::gst_sdp_media_attributes_to_caps(&self.0, caps.as_mut_ptr()) }; match result { ffi::GST_SDP_OK => Ok(()), _ => Err(()),