mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-25 18:38:09 +00:00
threadshare: Return a proper error type instead of ()
This commit is contained in:
parent
640d8ef904
commit
7e1181ab84
1 changed files with 3 additions and 1 deletions
|
@ -67,7 +67,7 @@ impl<T: SocketRead> Socket<T> {
|
||||||
element: gst::Element,
|
element: gst::Element,
|
||||||
buffer_pool: gst::BufferPool,
|
buffer_pool: gst::BufferPool,
|
||||||
reader: T,
|
reader: T,
|
||||||
) -> Result<Self, ()> {
|
) -> Result<Self, glib::BoolError> {
|
||||||
// FIXME couldn't we just delegate this to caller?
|
// FIXME couldn't we just delegate this to caller?
|
||||||
buffer_pool.set_active(true).map_err(|err| {
|
buffer_pool.set_active(true).map_err(|err| {
|
||||||
gst_error!(
|
gst_error!(
|
||||||
|
@ -76,6 +76,8 @@ impl<T: SocketRead> Socket<T> {
|
||||||
"Failed to prepare socket: {}",
|
"Failed to prepare socket: {}",
|
||||||
err
|
err
|
||||||
);
|
);
|
||||||
|
|
||||||
|
err
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
Ok(Socket::<T> {
|
Ok(Socket::<T> {
|
||||||
|
|
Loading…
Reference in a new issue