player: Avoid trying to join the player thread from itself
authorRoland Jon <rlandjon@gmail.com>
Mon, 2 Jul 2018 11:09:19 +0000 (19:09 +0800)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 2 Jul 2018 12:27:17 +0000 (15:27 +0300)
https://bugzilla.gnome.org/show_bug.cgi?id=796731

gst-libs/gst/player/gstplayer.c

index 5dd340a..5ab9e03 100644 (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);