You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
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 a50f90f1c2
. 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>
This commit is contained in:
@ -352,9 +352,11 @@ static int write_option(void *optctx, const OptionDef *po, const char *opt,
|
|||||||
|
|
||||||
ret = po->u.func_arg(optctx, opt, arg);
|
ret = po->u.func_arg(optctx, opt, arg);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
av_log(NULL, AV_LOG_ERROR,
|
if ((strcmp(opt, "init_hw_device") != 0) || (strcmp(arg, "list") != 0)) {
|
||||||
"Failed to set value '%s' for option '%s': %s\n",
|
av_log(NULL, AV_LOG_ERROR,
|
||||||
arg, opt, av_err2str(ret));
|
"Failed to set value '%s' for option '%s': %s\n",
|
||||||
|
arg, opt, av_err2str(ret));
|
||||||
|
}
|
||||||
goto finish;
|
goto finish;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user