From 7e1181ab84617c46a92becafa29f3002619c3231 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 29 Dec 2020 17:29:27 +0200 Subject: [PATCH] threadshare: Return a proper error type instead of () --- generic/threadshare/src/socket.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/generic/threadshare/src/socket.rs b/generic/threadshare/src/socket.rs index 500e44de..522725d3 100644 --- a/generic/threadshare/src/socket.rs +++ b/generic/threadshare/src/socket.rs @@ -67,7 +67,7 @@ impl Socket { element: gst::Element, buffer_pool: gst::BufferPool, reader: T, - ) -> Result { + ) -> Result { // FIXME couldn't we just delegate this to caller? buffer_pool.set_active(true).map_err(|err| { gst_error!( @@ -76,6 +76,8 @@ impl Socket { "Failed to prepare socket: {}", err ); + + err })?; Ok(Socket:: {