Skip to content

Commit

Permalink
Don't return a pointer to a local from _av_err2str
Browse files Browse the repository at this point in the history
  • Loading branch information
Daft-Freak committed Oct 14, 2024
1 parent 83c126e commit 58ee542
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 32blit-sdl/VideoCaptureFfmpeg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 58ee542

Please sign in to comment.