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>
pull/369/head
Andreas Rheinhardt 3 years ago
parent 04a5ffa75f
commit 467c6a9146
  1. 4
      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)");

Loading…
Cancel
Save