forked from mirrors/gstreamer-rs
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:
parent
20e10698ac
commit
ab2dbe0234
1 changed files with 2 additions and 4 deletions
|
@ -173,10 +173,8 @@ impl SDPMediaRef {
|
||||||
unsafe { ffi::gst_sdp_media_attributes_len(&self.0) }
|
unsafe { ffi::gst_sdp_media_attributes_len(&self.0) }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn attributes_to_caps(&self, caps: &gst::Caps) -> Result<(), ()> {
|
pub fn attributes_to_caps(&self, caps: &mut gst::CapsRef) -> Result<(), ()> {
|
||||||
let result = unsafe {
|
let result = unsafe { ffi::gst_sdp_media_attributes_to_caps(&self.0, caps.as_mut_ptr()) };
|
||||||
ffi::gst_sdp_media_attributes_to_caps(&self.0, caps.to_glib_none().0)
|
|
||||||
};
|
|
||||||
match result {
|
match result {
|
||||||
ffi::GST_SDP_OK => Ok(()),
|
ffi::GST_SDP_OK => Ok(()),
|
||||||
_ => Err(()),
|
_ => Err(()),
|
||||||
|
|
Loading…
Reference in a new issue