]> git.sesse.net Git - ffmpeg/commitdiff
avfilter/vsrc_life: Fix for random_seed type
authorLimin Wang <lance.lmwang@gmail.com>
Fri, 22 Nov 2019 01:50:38 +0000 (09:50 +0800)
committerMichael Niedermayer <michael@niedermayer.cc>
Fri, 6 Dec 2019 10:25:29 +0000 (11:25 +0100)
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavfilter/vsrc_life.c

index a87ceef15d45f98859395f9e2be48799b907c30d..4c0ea73d8a95d80a11075c3b3bfaaf25709b8827 100644 (file)
@@ -63,7 +63,7 @@ typedef struct LifeContext {
     uint64_t pts;
     AVRational frame_rate;
     double   random_fill_ratio;
-    uint32_t random_seed;
+    int64_t random_seed;
     int stitch;
     int mold;
     uint8_t  life_color[4];
@@ -87,8 +87,8 @@ static const AVOption life_options[] = {
     { "rule",     "set rule",         OFFSET(rule_str), AV_OPT_TYPE_STRING, {.str = "B3/S23"}, CHAR_MIN, CHAR_MAX, FLAGS },
     { "random_fill_ratio", "set fill ratio for filling initial grid randomly", OFFSET(random_fill_ratio), AV_OPT_TYPE_DOUBLE, {.dbl=1/M_PHI}, 0, 1, FLAGS },
     { "ratio",             "set fill ratio for filling initial grid randomly", OFFSET(random_fill_ratio), AV_OPT_TYPE_DOUBLE, {.dbl=1/M_PHI}, 0, 1, FLAGS },
-    { "random_seed", "set the seed for filling the initial grid randomly", OFFSET(random_seed), AV_OPT_TYPE_INT, {.i64=-1}, -1, UINT32_MAX, FLAGS },
-    { "seed",        "set the seed for filling the initial grid randomly", OFFSET(random_seed), AV_OPT_TYPE_INT, {.i64=-1}, -1, UINT32_MAX, FLAGS },
+    { "random_seed", "set the seed for filling the initial grid randomly", OFFSET(random_seed), AV_OPT_TYPE_INT64, {.i64=-1}, -1, UINT32_MAX, FLAGS },
+    { "seed",        "set the seed for filling the initial grid randomly", OFFSET(random_seed), AV_OPT_TYPE_INT64, {.i64=-1}, -1, UINT32_MAX, FLAGS },
     { "stitch",      "stitch boundaries", OFFSET(stitch), AV_OPT_TYPE_BOOL, {.i64=1}, 0, 1, FLAGS },
     { "mold",        "set mold speed for dead cells", OFFSET(mold), AV_OPT_TYPE_INT, {.i64=0}, 0, 0xFF, FLAGS },
     { "life_color",  "set life color",  OFFSET( life_color), AV_OPT_TYPE_COLOR, {.str="white"}, CHAR_MIN, CHAR_MAX, FLAGS },