summaryrefslogtreecommitdiff
path: root/libavfilter/vf_geq.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-21 08:10:49 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-21 17:57:35 +0200
commit467c6a914629857a1085c863bc8f7d32842f8d47 (patch)
tree654d5932f349d0a8136033e384c6f1daabb6118b /libavfilter/vf_geq.c
parent04a5ffa75fdbee4c1622d49185b057d564a155e1 (diff)
downloadffmpeg-467c6a914629857a1085c863bc8f7d32842f8d47.tar.gz
avfilter/vf_geq: Simplify creating string
Also fixes a Wformat-truncation warning from GCC. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter/vf_geq.c')
-rw-r--r--libavfilter/vf_geq.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libavfilter/vf_geq.c b/libavfilter/vf_geq.c
index 4a78336540..1dc59dc1fa 100644
--- a/libavfilter/vf_geq.c
+++ b/libavfilter/vf_geq.c
@@ -250,9 +250,7 @@ static av_cold int geq_init(AVFilterContext *ctx)
}
if (!geq->expr_str[A]) {
- char bps_string[8];
- snprintf(bps_string, sizeof(bps_string), "%d", (1<<geq->bps) - 1);
- geq->expr_str[A] = av_strdup(bps_string);
+ geq->expr_str[A] = av_asprintf("%d", (1<<geq->bps) - 1);
}
if (!geq->expr_str[G])
geq->expr_str[G] = av_strdup("g(X,Y)");