Make the printPrefix variable thread_local static

Logging can happen from multiple threads at the same time.
This commit is contained in:
Cameron Gutman committed 2026-11-14 23:48:05 -06:00
1 parent 3da99d62e5
commit f295b02e81
1 file changed
+1 -1
+1 -1
View File
@@ -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;