forked from mirrors/gstreamer-rs
bin: Use from_glib_none() in Bin::add() for subclasses
This way we take ownership of any floating references passed in here, as required by the GstBin API, instead of just borrowing the reference and having someone else sink it or not.
This commit is contained in:
parent
ead607ab8e
commit
84ac2ef073
1 changed files with 1 additions and 1 deletions
|
@ -116,7 +116,7 @@ where
|
||||||
let wrap: Bin = from_glib_borrow(ptr);
|
let wrap: Bin = from_glib_borrow(ptr);
|
||||||
|
|
||||||
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
|
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
|
||||||
match imp.add_element(&wrap, &from_glib_borrow(element)) {
|
match imp.add_element(&wrap, &from_glib_none(element)) {
|
||||||
Ok(()) => true,
|
Ok(()) => true,
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
err.log_with_object(&wrap);
|
err.log_with_object(&wrap);
|
||||||
|
|
Loading…
Reference in a new issue