player: Avoid trying to join the player thread from itself

https://bugzilla.gnome.org/show_bug.cgi?id=796731
This commit is contained in:
Roland Jon 2018-07-02 19:09:19 +08:00 committed by Sebastian Dröge
parent 27b28f3aec
commit d5aabd0f58

View file

@ -492,7 +492,10 @@ gst_player_dispose (GObject * object)
if (self->loop) {
g_main_loop_quit (self->loop);
g_thread_join (self->thread);
if (self->thread != g_thread_self ())
g_thread_join (self->thread);
else
g_thread_unref (self->thread);
self->thread = NULL;
g_main_loop_unref (self->loop);