diff --git a/examples/src/bin/appsink.rs b/examples/src/bin/appsink.rs index eb30de291..7c872c269 100644 --- a/examples/src/bin/appsink.rs +++ b/examples/src/bin/appsink.rs @@ -162,7 +162,7 @@ fn main_loop(pipeline: gst::Pipeline) -> Result<(), Error> { MessageView::Eos(..) => break, MessageView::Error(err) => { pipeline.set_state(gst::State::Null)?; - Err(ErrorMessage { + return Err(ErrorMessage { src: msg .get_src() .map(|s| String::from(s.get_path_string())) @@ -170,7 +170,8 @@ fn main_loop(pipeline: gst::Pipeline) -> Result<(), Error> { error: err.get_error().description().into(), debug: Some(err.get_debug().unwrap().to_string()), cause: err.get_error(), - })?; + } + .into()); } _ => (), } diff --git a/examples/src/bin/appsrc.rs b/examples/src/bin/appsrc.rs index 5f64a3b6d..1f725cabb 100644 --- a/examples/src/bin/appsrc.rs +++ b/examples/src/bin/appsrc.rs @@ -154,7 +154,7 @@ fn main_loop(pipeline: gst::Pipeline) -> Result<(), Error> { MessageView::Eos(..) => break, MessageView::Error(err) => { pipeline.set_state(gst::State::Null)?; - Err(ErrorMessage { + return Err(ErrorMessage { src: msg .get_src() .map(|s| String::from(s.get_path_string())) @@ -162,7 +162,8 @@ fn main_loop(pipeline: gst::Pipeline) -> Result<(), Error> { error: err.get_error().description().into(), debug: Some(err.get_debug().unwrap().to_string()), cause: err.get_error(), - })?; + } + .into()); } _ => (), } diff --git a/examples/src/bin/decodebin.rs b/examples/src/bin/decodebin.rs index 7b3a64c9b..8ff5634bf 100644 --- a/examples/src/bin/decodebin.rs +++ b/examples/src/bin/decodebin.rs @@ -289,7 +289,7 @@ fn example_main() -> Result<(), Error> { } #[cfg(not(feature = "v1_10"))] { - Err(ErrorMessage { + return Err(ErrorMessage { src: msg .get_src() .map(|s| String::from(s.get_path_string())) @@ -297,9 +297,9 @@ fn example_main() -> Result<(), Error> { error: err.get_error().description().into(), debug: Some(err.get_debug().unwrap().to_string()), cause: err.get_error(), - })?; + } + .into()); } - break; } MessageView::StateChanged(s) => { println!( diff --git a/examples/src/bin/encodebin.rs b/examples/src/bin/encodebin.rs index c3707d555..0e45bc752 100644 --- a/examples/src/bin/encodebin.rs +++ b/examples/src/bin/encodebin.rs @@ -318,7 +318,7 @@ fn example_main() -> Result<(), Error> { } #[cfg(not(feature = "v1_10"))] { - Err(ErrorMessage { + return Err(ErrorMessage { src: msg .get_src() .map(|s| String::from(s.get_path_string())) @@ -326,9 +326,9 @@ fn example_main() -> Result<(), Error> { error: err.get_error().description().into(), debug: Some(err.get_debug().unwrap().to_string()), cause: err.get_error(), - })?; + } + .into()); } - break; } MessageView::StateChanged(s) => { println!( diff --git a/examples/src/bin/glupload.rs b/examples/src/bin/glupload.rs index ceb4ba5d4..5038ce238 100644 --- a/examples/src/bin/glupload.rs +++ b/examples/src/bin/glupload.rs @@ -588,7 +588,7 @@ impl App { match msg.view() { MessageView::Eos(..) => break, MessageView::Error(err) => { - Err(ErrorMessage { + return Err(ErrorMessage { src: msg .get_src() .map(|s| String::from(s.get_path_string())) @@ -596,7 +596,8 @@ impl App { error: err.get_error().description().into(), debug: Some(err.get_debug().unwrap().to_string()), cause: err.get_error(), - })?; + } + .into()); } _ => (), } diff --git a/examples/src/bin/pango-cairo.rs b/examples/src/bin/pango-cairo.rs index 05e9423fc..e5e8d0644 100644 --- a/examples/src/bin/pango-cairo.rs +++ b/examples/src/bin/pango-cairo.rs @@ -251,7 +251,7 @@ fn main_loop(pipeline: gst::Pipeline) -> Result<(), Error> { MessageView::Eos(..) => break, MessageView::Error(err) => { pipeline.set_state(gst::State::Null)?; - Err(ErrorMessage { + return Err(ErrorMessage { src: msg .get_src() .map(|s| String::from(s.get_path_string())) @@ -259,7 +259,8 @@ fn main_loop(pipeline: gst::Pipeline) -> Result<(), Error> { error: err.get_error().description().into(), debug: Some(err.get_debug().unwrap().to_string()), cause: err.get_error(), - })?; + } + .into()); } _ => (), } diff --git a/examples/src/bin/tagsetter.rs b/examples/src/bin/tagsetter.rs index c7259b402..60190a122 100644 --- a/examples/src/bin/tagsetter.rs +++ b/examples/src/bin/tagsetter.rs @@ -102,7 +102,7 @@ fn example_main() -> Result<(), Error> { match msg.view() { MessageView::Eos(..) => break, MessageView::Error(err) => { - Err(ErrorMessage { + return Err(ErrorMessage { src: err .get_src() .map(|s| s.get_path_string()) @@ -111,8 +111,8 @@ fn example_main() -> Result<(), Error> { error: err.get_error().description().into(), debug: Some(err.get_debug().unwrap().to_string()), cause: err.get_error(), - })?; - break; + } + .into()); } _ => (), } diff --git a/examples/src/bin/transmux.rs b/examples/src/bin/transmux.rs index 4d8f4c794..ca38b5c2e 100644 --- a/examples/src/bin/transmux.rs +++ b/examples/src/bin/transmux.rs @@ -168,7 +168,7 @@ fn example_main() -> Result<(), Error> { MessageView::Error(err) => { pipeline.set_state(gst::State::Null)?; - Err(ErrorMessage { + return Err(ErrorMessage { src: msg .get_src() .map(|s| String::from(s.get_path_string())) @@ -176,8 +176,8 @@ fn example_main() -> Result<(), Error> { error: err.get_error().description().into(), debug: Some(err.get_debug().unwrap().to_string()), cause: err.get_error(), - })?; - break; + } + .into()); } MessageView::StateChanged(s) => { println!(