diff mbox series

[FFmpeg-devel,1/2] avfilter/textutils, vf_drawtext, qrencode: Constify function pointers

Message ID AS8P250MB074427E6E2FFDF2E92CAF7A48FC82@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM
State New
Headers show
Series [FFmpeg-devel,1/2] avfilter/textutils, vf_drawtext, qrencode: Constify function pointers | expand

Checks

Context Check Description
yinshiyou/commit_msg_loongarch64 warning The first line of the commit message must start with a context terminated by a colon and a space, for example "lavu/opt: " or "doc: ".
andriy/commit_msg_x86 warning The first line of the commit message must start with a context terminated by a colon and a space, for example "lavu/opt: " or "doc: ".
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt June 20, 2024, 9:51 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavfilter/qrencode.c    | 2 +-
 libavfilter/textutils.c   | 2 +-
 libavfilter/textutils.h   | 2 +-
 libavfilter/vf_drawtext.c | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/libavfilter/qrencode.c b/libavfilter/qrencode.c
index 0b1f7bb50a..1c7ce23e6e 100644
--- a/libavfilter/qrencode.c
+++ b/libavfilter/qrencode.c
@@ -284,7 +284,7 @@  static int func_eval_expr_formatted(void *ctx, AVBPrint *bp, const char *functio
                                         argv[1][0], positions);
 }
 
-static FFExpandTextFunction expand_text_functions[] = {
+static const FFExpandTextFunction expand_text_functions[] = {
     { "expr",            1, 1, func_eval_expr },
     { "e",               1, 1, func_eval_expr },
     { "expr_formatted",  2, 3, func_eval_expr_formatted },
diff --git a/libavfilter/textutils.c b/libavfilter/textutils.c
index 45967794bc..0b132fd153 100644
--- a/libavfilter/textutils.c
+++ b/libavfilter/textutils.c
@@ -36,7 +36,7 @@  static int ff_expand_text_function_internal(FFExpandTextContext *expand_text, AV
                                             char *name, unsigned argc, char **argv)
 {
     void *log_ctx = expand_text->log_ctx;
-    FFExpandTextFunction *functions = expand_text->functions;
+    const FFExpandTextFunction *functions = expand_text->functions;
     unsigned i;
 
     for (i = 0; i < expand_text->functions_nb; i++) {
diff --git a/libavfilter/textutils.h b/libavfilter/textutils.h
index 7fa856c681..d89956bfcc 100644
--- a/libavfilter/textutils.h
+++ b/libavfilter/textutils.h
@@ -74,7 +74,7 @@  typedef struct FFExpandTextContext {
      * list of functions to use to expand sequences in the format
      * FUNCTION_NAME{PARAMS}
      */
-    FFExpandTextFunction *functions;
+    const FFExpandTextFunction *functions;
 
     /**
      * number of functions
diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
index 2b6a0d0839..0ac0a0721c 100644
--- a/libavfilter/vf_drawtext.c
+++ b/libavfilter/vf_drawtext.c
@@ -950,7 +950,7 @@  static int func_eval_expr_int_format(void *ctx, AVBPrint *bp, const char *functi
                                         argv[1][0], positions);
 }
 
-static FFExpandTextFunction expand_text_functions[] = {
+static const FFExpandTextFunction expand_text_functions[] = {
     { "e",               1, 1, func_eval_expr },
     { "eif",             2, 3, func_eval_expr_int_format },
     { "expr",            1, 1, func_eval_expr },