diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2023-01-27 19:58:59 +0300 |
---|---|---|
committer | Sebastian Dröge <slomo@coaxion.net> | 2023-01-27 21:50:01 +0300 |
commit | c7209dbd4fe4e229fc34e7ef1253e416cc518ae3 (patch) | |
tree | b54b256e07ade22dcbc6efb08005f75d43ec7e54 /video | |
parent | 62bfc545d370ec35063a52861bdc41be08bbdb99 (diff) |
Return exit code from `gio::Application::run()` from `main()`
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1065>
Diffstat (limited to 'video')
-rw-r--r-- | video/gtk4/examples/gtksink.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/video/gtk4/examples/gtksink.rs b/video/gtk4/examples/gtksink.rs index 160ef281..acaa8235 100644 --- a/video/gtk4/examples/gtksink.rs +++ b/video/gtk4/examples/gtksink.rs @@ -141,7 +141,7 @@ fn create_ui(app: >k::Application) { }); } -fn main() { +fn main() -> glib::ExitCode { gst::init().unwrap(); gtk::init().unwrap(); @@ -150,9 +150,11 @@ fn main() { let app = gtk::Application::new(None::<&str>, gio::ApplicationFlags::FLAGS_NONE); app.connect_activate(create_ui); - app.run(); + let res = app.run(); unsafe { gst::deinit(); } + + res } |