diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2016-07-20 11:43:51 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2016-07-21 20:32:43 +0300 |
commit | f643fbbc5724e0d84229a8168a7f53af6c5d795e (patch) | |
tree | b5feee148566531ceacabd237c2aeea004566aba | |
parent | ea90e63c1064503f9ba5d59aa4ca604f13ca5def (diff) |
Call gst_deinit() in all applications at the end of main()
Needed to be able to track leaks using valgrind or the leaks tracer.
-rw-r--r-- | gst-play/gst-play.c | 1 | ||||
-rw-r--r-- | gtk/gtk-play.c | 1 | ||||
-rw-r--r-- | qt/main.cpp | 6 |
3 files changed, 7 insertions, 1 deletions
diff --git a/gst-play/gst-play.c b/gst-play/gst-play.c index 46f6d62..bd21bd2 100644 --- a/gst-play/gst-play.c +++ b/gst-play/gst-play.c @@ -768,5 +768,6 @@ main (int argc, char **argv) play_free (play); g_print ("\n"); + gst_deinit (); return 0; } diff --git a/gtk/gtk-play.c b/gtk/gtk-play.c index 6bc8fd8..7f9e588 100644 --- a/gtk/gtk-play.c +++ b/gtk/gtk-play.c @@ -1910,5 +1910,6 @@ main (gint argc, gchar ** argv) status = g_application_run (G_APPLICATION (app), argc, argv);; g_object_unref (app); + gst_deinit (); return status; } diff --git a/qt/main.cpp b/qt/main.cpp index 4ef6b64..9a8adf6 100644 --- a/qt/main.cpp +++ b/qt/main.cpp @@ -30,6 +30,7 @@ int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); + int result; QCommandLineParser parser; parser.setApplicationDescription("GstPlayer"); @@ -70,5 +71,8 @@ int main(int argc, char *argv[]) if (!media_files.isEmpty()) player->setPlaylist(media_files); - return app.exec(); + result = app.exec(); + + gst_deinit (); + return result; } |