summaryrefslogtreecommitdiffstats
path: root/demux/demux.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-10-19 23:32:34 +0200
committerwm4 <wm4@nowhere>2014-10-19 23:48:40 +0200
commit9ba66418790f184339ad3a891f525d54459d6369 (patch)
tree0ddfa7df4ba0e7684ee9b12938c0dc07f4c5f64b /demux/demux.c
parentc6dca55665e2710163437f09c04033d4b30e2e1a (diff)
downloadmpv-9ba66418790f184339ad3a891f525d54459d6369.tar.bz2
mpv-9ba66418790f184339ad3a891f525d54459d6369.tar.xz
Set thread name for debugging
Especially with other components (libavcodec, OSX stuff), the thread list can get quite populated. Setting the thread name helps when debugging. Since this is not portable, we check the OS variants in waf configure. old-configure just gets a special-case for glibc, since doing a full check here would probably be a waste of effort.
Diffstat (limited to 'demux/demux.c')
-rw-r--r--demux/demux.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/demux/demux.c b/demux/demux.c
index 6f226d8737..e5cd4d53fe 100644
--- a/demux/demux.c
+++ b/demux/demux.c
@@ -33,6 +33,7 @@
#include "talloc.h"
#include "common/msg.h"
#include "common/global.h"
+#include "osdep/threads.h"
#include "stream/stream.h"
#include "demux.h"
@@ -455,6 +456,7 @@ static void execute_seek(struct demux_internal *in)
static void *demux_thread(void *pctx)
{
struct demux_internal *in = pctx;
+ mpthread_set_name("demux");
pthread_mutex_lock(&in->lock);
while (!in->thread_terminate) {
in->thread_paused = in->thread_request_pause > 0;