diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-06-20 21:01:34 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-06-30 11:37:06 +0200 |
commit | 2330e77c976f4b41ae3ad5526138b3479f595819 (patch) | |
tree | 1adbc4c1a5593cda7566dc0827a9fac395ab6811 | |
parent | ba457e9adbd8188d48f8a91384461f498e0d10d6 (diff) | |
download | ffmpeg-2330e77c976f4b41ae3ad5526138b3479f595819.tar.gz |
avfilter/textutils: Constify ff_expand_text()
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r-- | libavfilter/textutils.c | 6 | ||||
-rw-r--r-- | libavfilter/textutils.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/libavfilter/textutils.c b/libavfilter/textutils.c index 0b132fd153..e6b5239b20 100644 --- a/libavfilter/textutils.c +++ b/libavfilter/textutils.c @@ -79,7 +79,7 @@ static int ff_expand_text_function_internal(FFExpandTextContext *expand_text, AV * @return negative value corresponding to an AVERROR error code in case of * errors, a non-negative value otherwise */ -static int ff_expand_text_function(FFExpandTextContext *expand_text, AVBPrint *bp, char **rtext) +static int ff_expand_text_function(FFExpandTextContext *expand_text, AVBPrint *bp, const char **rtext) { void *log_ctx = expand_text->log_ctx; const char *text = *rtext; @@ -112,7 +112,7 @@ static int ff_expand_text_function(FFExpandTextContext *expand_text, AVBPrint *b if ((ret = ff_expand_text_function_internal(expand_text, bp, argv[0], argc - 1, argv + 1)) < 0) goto end; ret = 0; - *rtext = (char *)text + 1; + *rtext = text + 1; end: for (i = 0; i < argc; i++) @@ -120,7 +120,7 @@ end: return ret; } -int ff_expand_text(FFExpandTextContext *expand_text, char *text, AVBPrint *bp) +int ff_expand_text(FFExpandTextContext *expand_text, const char *text, AVBPrint *bp) { int ret; diff --git a/libavfilter/textutils.h b/libavfilter/textutils.h index d89956bfcc..8c2399d153 100644 --- a/libavfilter/textutils.h +++ b/libavfilter/textutils.h @@ -94,7 +94,7 @@ typedef struct FFExpandTextContext { * @return negative value corresponding to an AVERROR error code in case of * errors, a non-negative value otherwise */ -int ff_expand_text(FFExpandTextContext *expand_text, char *text, AVBPrint *bp); +int ff_expand_text(FFExpandTextContext *expand_text, const char *text, AVBPrint *bp); /** * Print PTS representation to an AVBPrint object. |