From e965fe9057ff4436fe0778c8c5c396793f3f331c Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Fri, 19 Sep 2025 20:36:18 +0200 Subject: [PATCH] avformat/mccenc: Avoid relocations Reviewed-by: Jacob Lifshay Signed-off-by: Andreas Rheinhardt --- libavformat/mccenc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/mccenc.c b/libavformat/mccenc.c index d34b8625c4..1fbeebfe0f 100644 --- a/libavformat/mccenc.c +++ b/libavformat/mccenc.c @@ -144,7 +144,7 @@ static int mcc_write_header(AVFormatContext *avf) if (!localtime_r((time_t[1]){ timeval / 1000000 }, &tm)) return AVERROR(EINVAL); // we can't rely on having the C locale, so convert the date/time to a string ourselves: - static const char *const months[12] = { + static const char months[12][10] = { "January", "February", "March", @@ -162,7 +162,7 @@ static int mcc_write_header(AVFormatContext *avf) av_assert0(tm.tm_mon >= 0 && tm.tm_mon < FF_ARRAY_ELEMS(months)); const char *month = months[tm.tm_mon]; - static const char *const weekdays[7] = { + static const char weekdays[7][10] = { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" }; // assert that values are sane so we don't index out of bounds