mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-11-28 08:43:57 +00:00
Make the printPrefix variable thread_local static
Logging can happen from multiple threads at the same time.
This commit is contained in:
1 parent
3da99d62e5
commit
f295b02e81
1 file changed
+1
-1
+1
-1
@@ -241,7 +241,7 @@ void qtLogToDiskHandler(QtMsgType type, const QMessageLogContext&, const QString
|
||||
void ffmpegLogToDiskHandler(void* ptr, int level, const char* fmt, va_list vl)
|
||||
{
|
||||
char lineBuffer[1024];
|
||||
static int printPrefix = 1;
|
||||
thread_local int printPrefix = 1;
|
||||
|
||||
if ((level & 0xFF) > av_log_get_level()) {
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user