From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Subject: [FFmpeg-devel] [PATCH 2/2] avfilter/textutils: Constify ff_expand_text() Date: Thu, 20 Jun 2024 23:52:08 +0200 Message-ID: <AS8P250MB0744EFC0BC15AC9BAF1560D78FC82@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> (raw) In-Reply-To: <AS8P250MB074427E6E2FFDF2E92CAF7A48FC82@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavfilter/textutils.c | 6 +++--- 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. -- 2.40.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
prev parent reply other threads:[~2024-06-20 21:52 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-06-20 21:51 [FFmpeg-devel] [PATCH 1/2] avfilter/textutils, vf_drawtext, qrencode: Constify function pointers Andreas Rheinhardt 2024-06-20 21:52 ` Andreas Rheinhardt [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=AS8P250MB0744EFC0BC15AC9BAF1560D78FC82@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM \ --to=andreas.rheinhardt@outlook.com \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git