diff mbox

[FFmpeg-devel,v1,1/2] avfilter/vsrc_cellauto: fix the print argument mismatch

Message ID 20191207025311.4538-1-lance.lmwang@gmail.com
State New
Headers show

Commit Message

Limin Wang Dec. 7, 2019, 2:53 a.m. UTC
From: Limin Wang <lance.lmwang@gmail.com>

Fix CID 1456556

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
---
 libavfilter/vsrc_cellauto.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
diff mbox

Patch

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;
 }