[FFmpeg-devel] [PATCH] cmdutils: improve feedback in case of not found option
Stefano Sabatini
stefasab at gmail.com
Sun Mar 10 15:52:38 CET 2013
---
cmdutils.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/cmdutils.c b/cmdutils.c
index b62074e..7c3ca3e 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -296,7 +296,8 @@ static int write_option(void *optctx, const OptionDef *po, const char *opt,
int 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'\n", arg, opt);
+ "Failed to set value '%s' for option '%s': %s\n",
+ arg, opt, av_err2str(ret));
return ret;
}
}
@@ -538,6 +539,8 @@ int opt_default(void *optctx, const char *opt, const char *arg)
if (consumed)
return 0;
+ av_log(NULL, AV_LOG_ERROR, "Could not find option '%s' in any of the FFmpeg subsystems "
+ "(codec, format, scaler, resampler contexts)\n", opt);
return AVERROR_OPTION_NOT_FOUND;
}
--
1.7.9.5
More information about the ffmpeg-devel
mailing list