diff options
author | Jun Zhao <mypopydev@gmail.com> | 2025-03-26 16:51:36 +0800 |
---|---|---|
committer | Jun Zhao <barryjzhao@tencent.com> | 2025-04-03 06:29:12 +0800 |
commit | efa0c6252faa66ab90d0d5e60b0d4305474b7a8e (patch) | |
tree | ffe1ad39366189c3900906b5756bd6b76aca0324 /fftools/cmdutils.c | |
parent | 976c16109bb09ad65fbf079af9ef5120a9f91e3e (diff) | |
download | ffmpeg-efa0c6252faa66ab90d0d5e60b0d4305474b7a8e.tar.gz |
fftools/cmdutils: fix error message for "ffmpeg -init_hw_device list"
When running 'ffmpeg -init_hw_device list' to display available hardware
devices, it incorrectly shows an error message:
"Failed to set value 'list' for option 'init_hw_device': Immediate exit requested"
This is a regression introduced by commit a50f90f1c23. The command is
actually working as intended - it should exit after listing devices, but
shouldn't display an error message.
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
Diffstat (limited to 'fftools/cmdutils.c')
-rw-r--r-- | fftools/cmdutils.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index 8ac20bf049..be21ed2c6c 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmdutils.c @@ -352,9 +352,11 @@ static int write_option(void *optctx, const OptionDef *po, const char *opt, ret = po->u.func_arg(optctx, opt, arg); if (ret < 0) { - av_log(NULL, AV_LOG_ERROR, - "Failed to set value '%s' for option '%s': %s\n", - arg, opt, av_err2str(ret)); + if ((strcmp(opt, "init_hw_device") != 0) || (strcmp(arg, "list") != 0)) { + av_log(NULL, AV_LOG_ERROR, + "Failed to set value '%s' for option '%s': %s\n", + arg, opt, av_err2str(ret)); + } goto finish; } } |