diff mbox series

[FFmpeg-devel,8/8] fftools: Fix implicit-const-int-float-conversion warning

Message ID tencent_3C343981A8357F3F1356A79C3AE0045A1E09@qq.com
State Accepted
Commit 1b416311852c085bd91743486df2086f508efdcd
Headers show
Series [FFmpeg-devel,1/8] configure: Lower Android API level requirement of mediandk | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Zhao Zhili April 17, 2024, 4:37 a.m. UTC
From: Zhao Zhili <zhilizhao@tencent.com>

---
 fftools/cmdutils.c   | 2 +-
 fftools/ffmpeg_opt.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c
index 2120fc7935..a8f5c6d89b 100644
--- a/fftools/cmdutils.c
+++ b/fftools/cmdutils.c
@@ -311,7 +311,7 @@  static int write_option(void *optctx, const OptionDef *po, const char *opt,
 
         *(int *)dst = num;
     } else if (po->type == OPT_TYPE_INT64) {
-        ret = parse_number(opt, arg, OPT_TYPE_INT64, INT64_MIN, INT64_MAX, &num);
+        ret = parse_number(opt, arg, OPT_TYPE_INT64, INT64_MIN, (double)INT64_MAX, &num);
         if (ret < 0)
             goto finish;
 
diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
index 6526e8e3e8..910e4a336b 100644
--- a/fftools/ffmpeg_opt.c
+++ b/fftools/ffmpeg_opt.c
@@ -317,7 +317,7 @@  static int opt_filter_threads(void *optctx, const char *opt, const char *arg)
 static int opt_abort_on(void *optctx, const char *opt, const char *arg)
 {
     static const AVOption opts[] = {
-        { "abort_on"           , NULL, 0, AV_OPT_TYPE_FLAGS, { .i64 = 0 }, INT64_MIN, INT64_MAX,           .unit = "flags" },
+        { "abort_on"           , NULL, 0, AV_OPT_TYPE_FLAGS, { .i64 = 0 }, INT64_MIN, (double)INT64_MAX,   .unit = "flags" },
         { "empty_output"       , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = ABORT_ON_FLAG_EMPTY_OUTPUT        }, .unit = "flags" },
         { "empty_output_stream", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = ABORT_ON_FLAG_EMPTY_OUTPUT_STREAM }, .unit = "flags" },
         { NULL },