sdp: Fix SDPMedia::attributes_to_caps() signature to actually work

It has to take a mutable caps reference or otherwise will simply fail.
This commit is contained in:
Sebastian Dröge 2019-02-27 18:04:52 +02:00
parent 20e10698ac
commit ab2dbe0234

View file

@ -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(()),