[FFmpeg-devel] [PATCH v1 1/2] avfilter/vsrc_cellauto: fix the print argument mismatch
lance.lmwang at gmail.com
lance.lmwang at gmail.com
Sat Dec 7 04:53:10 EET 2019
From: Limin Wang <lance.lmwang at gmail.com>
Fix CID 1456556
Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
---
libavfilter/vsrc_cellauto.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/libavfilter/vsrc_cellauto.c b/libavfilter/vsrc_cellauto.c
index c754603..03bdaba 100644
--- a/libavfilter/vsrc_cellauto.c
+++ b/libavfilter/vsrc_cellauto.c
@@ -182,14 +182,17 @@ static av_cold int init(AVFilterContext *ctx)
} else {
/* fill the first row randomly */
int i;
+ uint32_t seed;
s->buf = av_mallocz_array(sizeof(uint8_t) * s->w, s->h);
if (!s->buf)
return AVERROR(ENOMEM);
if (s->random_seed == -1)
s->random_seed = av_get_random_seed();
+ seed = s->random_seed;
+ av_log(ctx, AV_LOG_VERBOSE, "random seed: 0x%08"PRIx32"\n", seed);
- av_lfg_init(&s->lfg, s->random_seed);
+ av_lfg_init(&s->lfg, seed);
for (i = 0; i < s->w; i++) {
double r = (double)av_lfg_get(&s->lfg) / UINT32_MAX;
@@ -199,10 +202,9 @@ static av_cold int init(AVFilterContext *ctx)
}
av_log(ctx, AV_LOG_VERBOSE,
- "s:%dx%d r:%d/%d rule:%d stitch:%d scroll:%d full:%d seed:%"PRIu32"\n",
+ "s:%dx%d r:%d/%d rule:%d stitch:%d scroll:%d full:%d\n",
s->w, s->h, s->frame_rate.num, s->frame_rate.den,
- s->rule, s->stitch, s->scroll, s->start_full,
- s->random_seed);
+ s->rule, s->stitch, s->scroll, s->start_full);
return 0;
}
--
2.9.5
More information about the ffmpeg-devel
mailing list