[FFmpeg-devel] [PATCH] ffmpeg: complain loudly and exit in case of -sameq

Stefano Sabatini stefasab at gmail.com
Fri Nov 2 13:02:03 CET 2012


This is better than silently ignoring the option, resulting in unexpected
quality results.
---
 ffmpeg_opt.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
index adf40f2..97e6cf7 100644
--- a/ffmpeg_opt.c
+++ b/ffmpeg_opt.c
@@ -159,8 +159,9 @@ static int opt_pad(void *optctx, const char *opt, const char *arg)
 
 static int opt_sameq(void *optctx, const char *opt, const char *arg)
 {
-    av_log(NULL, AV_LOG_WARNING, "Ignoring option '%s'\n", opt);
-    return 0;
+    av_log(NULL, AV_LOG_ERROR, "Option '%s' was removed. "
+           "Use -qscale 0 or an equivalent option to achieve the same effect.\n", opt);
+    return AVERROR(EINVAL);
 }
 
 static int opt_video_channel(void *optctx, const char *opt, const char *arg)
-- 
1.7.5.4



More information about the ffmpeg-devel mailing list