[FFmpeg-cvslog] cmdutils: improve feedback in case of not found option

Stefano Sabatini git at videolan.org
Wed Mar 13 00:40:31 CET 2013


ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Sun Mar 10 15:36:20 2013 +0100| [8bb5680d904008b1a851f14078a2e9a9e9489fee] | committer: Stefano Sabatini

cmdutils: improve feedback in case of not found option

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8bb5680d904008b1a851f14078a2e9a9e9489fee
---

 cmdutils.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/cmdutils.c b/cmdutils.c
index 75c1793..8b8eacc 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -294,7 +294,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;
         }
     }
@@ -546,6 +547,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;
 }
 



More information about the ffmpeg-cvslog mailing list