From 58ee5425b79a858edce05d4f5a3226fd9f4646b3 Mon Sep 17 00:00:00 2001 From: Charlie Birks Date: Mon, 14 Oct 2024 12:32:53 +0100 Subject: [PATCH] Don't return a pointer to a local from _av_err2str --- 32blit-sdl/VideoCaptureFfmpeg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/32blit-sdl/VideoCaptureFfmpeg.cpp b/32blit-sdl/VideoCaptureFfmpeg.cpp index 1fc89ec91..120c3246b 100644 --- a/32blit-sdl/VideoCaptureFfmpeg.cpp +++ b/32blit-sdl/VideoCaptureFfmpeg.cpp @@ -74,7 +74,7 @@ int encode_video = 0, encode_audio = 0; char *_av_err2str(int errnum) { /* C++ friendly alternate to av_err2str */ - char buf[AV_ERROR_MAX_STRING_SIZE] = {}; + thread_local char buf[AV_ERROR_MAX_STRING_SIZE] = {}; return av_make_error_string(buf, AV_ERROR_MAX_STRING_SIZE, errnum); }