forked from mirrors/gstreamer-rs
gstreamer/element: Don't catch panics in post_message() vfunc
Otherwise we would post a message, which calls into this code again and then does the whole thing recursively forever.
This commit is contained in:
parent
4fbbf48622
commit
0cc32a02cc
1 changed files with 3 additions and 4 deletions
|
@ -550,10 +550,9 @@ where
|
||||||
let imp = instance.get_impl();
|
let imp = instance.get_impl();
|
||||||
let wrap: Borrowed<Element> = from_glib_borrow(ptr);
|
let wrap: Borrowed<Element> = from_glib_borrow(ptr);
|
||||||
|
|
||||||
gst_panic_to_error!(&wrap, &instance.panicked(), false, {
|
// Can't catch panics here as posting the error message would cause
|
||||||
imp.post_message(&wrap, from_glib_full(msg))
|
// this code to be called again recursively forever.
|
||||||
})
|
imp.post_message(&wrap, from_glib_full(msg)).to_glib()
|
||||||
.to_glib()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
|
Loading…
Reference in a new issue