diff options
Diffstat (limited to 'player')
-rw-r--r-- | player/client.c | 2 | ||||
-rw-r--r-- | player/misc.c | 2 | ||||
-rw-r--r-- | player/scripting.c | 5 |
3 files changed, 9 insertions, 0 deletions
diff --git a/player/client.c b/player/client.c index 2166255c2c..17d315bc1d 100644 --- a/player/client.c +++ b/player/client.c @@ -419,6 +419,8 @@ static void *playback_thread(void *p) struct MPContext *mpctx = p; mpctx->autodetach = true; + mpthread_set_name("playback core"); + mp_play_files(mpctx); // This actually waits until all clients are gone before actually diff --git a/player/misc.c b/player/misc.c index 21e9bcbba3..81b80a1948 100644 --- a/player/misc.c +++ b/player/misc.c @@ -26,6 +26,7 @@ #include "osdep/io.h" #include "osdep/timer.h" +#include "osdep/threads.h" #include "common/msg.h" #include "options/options.h" @@ -249,6 +250,7 @@ struct wrapper_args { static void *thread_wrapper(void *pctx) { struct wrapper_args *args = pctx; + mpthread_set_name("opener"); args->thread_fn(args->thread_arg); pthread_mutex_lock(&args->mutex); args->done = true; diff --git a/player/scripting.c b/player/scripting.c index 5bc9a915f3..935bbd0490 100644 --- a/player/scripting.c +++ b/player/scripting.c @@ -26,6 +26,7 @@ #include "config.h" #include "osdep/io.h" +#include "osdep/threads.h" #include "common/common.h" #include "common/msg.h" @@ -78,6 +79,10 @@ static void *script_thread(void *p) struct thread_arg *arg = p; + char name[90]; + snprintf(name, sizeof(name), "script (%s)", arg->fname); + mpthread_set_name(name); + if (arg->backend->load(arg->client, arg->fname) < 0) MP_ERR(arg, "Could not load script %s\n", arg->fname); |