Browse code

ffmpeg: complain loudly and exit in case removed -sameq option is specified

This is better than silently ignoring the option, which results in
unexpected quality results.

Stefano Sabatini authored on 2012/11/02 20:57:15
Showing 1 changed files
... ...
@@ -159,8 +159,11 @@ static int opt_pad(void *optctx, const char *opt, const char *arg)
159 159
 
160 160
 static int opt_sameq(void *optctx, const char *opt, const char *arg)
161 161
 {
162
-    av_log(NULL, AV_LOG_WARNING, "Ignoring option '%s'\n", opt);
163
-    return 0;
162
+    av_log(NULL, AV_LOG_ERROR, "Option '%s' was removed. "
163
+           "If you are looking for an option to preserve the quality (which is not "
164
+           "what -%s was for), use -qscale 0 or an equivalent quality factor option.\n",
165
+           opt, opt);
166
+    return AVERROR(EINVAL);
164 167
 }
165 168
 
166 169
 static int opt_video_channel(void *optctx, const char *opt, const char *arg)