aboutsummaryrefslogtreecommitdiffstats
path: root/src/DecoderThread.cxx
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/DecoderThread.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/DecoderThread.cxx b/src/DecoderThread.cxx
index 8658c8883..5c0e31034 100644
--- a/src/DecoderThread.cxx
+++ b/src/DecoderThread.cxx
@@ -34,6 +34,7 @@
#include "util/UriUtil.hxx"
#include "util/Error.hxx"
#include "util/Domain.hxx"
+#include "thread/Name.hxx"
#include "tag/ApeReplayGain.hxx"
#include "Log.hxx"
@@ -127,8 +128,12 @@ decoder_stream_decode(const DecoderPlugin &plugin,
decoder.dc.Unlock();
+ FormatThreadName("decoder:%s", plugin.name);
+
plugin.StreamDecode(decoder, input_stream);
+ SetThreadName("decoder");
+
decoder.dc.Lock();
assert(decoder.dc.state == DecoderState::START ||
@@ -155,8 +160,12 @@ decoder_file_decode(const DecoderPlugin &plugin,
decoder.dc.Unlock();
+ FormatThreadName("decoder:%s", plugin.name);
+
plugin.FileDecode(decoder, path);
+ SetThreadName("decoder");
+
decoder.dc.Lock();
assert(decoder.dc.state == DecoderState::START ||
@@ -421,6 +430,8 @@ decoder_task(void *arg)
{
DecoderControl &dc = *(DecoderControl *)arg;
+ SetThreadName("decoder");
+
dc.Lock();
do {