summaryrefslogtreecommitdiff
path: root/gst-libs/gst/player
diff options
context:
space:
mode:
authorRoland Jon <rlandjon@gmail.com>2018-07-02 19:09:19 +0800
committerSebastian Dröge <sebastian@centricular.com>2018-07-02 15:27:17 +0300
commitd5aabd0f58a7fe4c9b0b38303c7952cfc95c1283 (patch)
treef8b5772b8c8ab72137d84c1dd273c67e95647684 /gst-libs/gst/player
parent27b28f3aec4c6bd9869c505bca5df5e7007a20b7 (diff)
downloadgstreamer-plugins-bad-d5aabd0f58a7fe4c9b0b38303c7952cfc95c1283.tar.gz
player: Avoid trying to join the player thread from itself
https://bugzilla.gnome.org/show_bug.cgi?id=796731
Diffstat (limited to 'gst-libs/gst/player')
-rw-r--r--gst-libs/gst/player/gstplayer.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gst-libs/gst/player/gstplayer.c b/gst-libs/gst/player/gstplayer.c
index 5dd340af8..5ab9e03e3 100644
--- a/gst-libs/gst/player/gstplayer.c
+++ b/gst-libs/gst/player/gstplayer.c
@@ -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);