Also fixes a Wformat-truncation warning from GCC.

Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com>
---
 libavfilter/vf_geq.c | 4 +---
 1 file changed, 1 insertion(+), 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)");
-- 
2.30.2

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to