playback/player: Call gst_deinit() in all applications at the end of main()

Needed to be able to track leaks using valgrind or the leaks tracer.
This commit is contained in:
Guillaume Desmottes 2016-07-20 11:43:51 +02:00 committed by Sebastian Dröge
parent 2435b0e37c
commit 10dd3a2177
3 changed files with 7 additions and 1 deletions

View file

@ -768,5 +768,6 @@ main (int argc, char **argv)
play_free (play);
g_print ("\n");
gst_deinit ();
return 0;
}

View file

@ -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;
}

View file

@ -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;
}