summaryrefslogtreecommitdiff
path: root/fftools/ffmpeg_mux.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2022-10-18 18:50:30 +0200
committerAnton Khirnov <anton@khirnov.net>2022-10-24 02:00:31 +0200
commit874a6f20902c91eb32b790b042ba77221f60c96b (patch)
tree93c649a94c5ee63836f4b557081b80dc4435efef /fftools/ffmpeg_mux.c
parenta2f5913857b9ed5e2823aa02ea9293a035958456 (diff)
downloadffmpeg-874a6f20902c91eb32b790b042ba77221f60c96b.tar.gz
fftools/ffmpeg: set thread names
Diffstat (limited to 'fftools/ffmpeg_mux.c')
-rw-r--r--fftools/ffmpeg_mux.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c
index 2b70143978..778626e20f 100644
--- a/fftools/ffmpeg_mux.c
+++ b/fftools/ffmpeg_mux.c
@@ -184,6 +184,13 @@ static int sync_queue_process(Muxer *mux, OutputStream *ost, AVPacket *pkt)
return 0;
}
+static void thread_set_name(OutputFile *of)
+{
+ char name[16];
+ snprintf(name, sizeof(name), "mux%d:%s", of->index, of->format->name);
+ ff_thread_setname(name);
+}
+
static void *muxer_thread(void *arg)
{
Muxer *mux = arg;
@@ -197,6 +204,8 @@ static void *muxer_thread(void *arg)
goto finish;
}
+ thread_set_name(of);
+
while (1) {
OutputStream *ost;
int stream_idx;