From 9ba66418790f184339ad3a891f525d54459d6369 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 19 Oct 2014 23:32:34 +0200 Subject: 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. --- demux/demux.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'demux') 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; -- cgit v1.2.3