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

Stefano Sabatini stefasab at gmail.com
Sat Nov 3 13:10:18 CET 2012


On date Friday 2012-11-02 13:28:44 +0100, Clément Bœsch encoded:
> On Fri, Nov 02, 2012 at 01:02:03PM +0100, Stefano Sabatini wrote:
> > 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);
> 
> I'd say something like "Option '%s' was removed. If you are looking for an
> option to preserve the quality (which is not what -%s was for), use -qscale
> 0 or an equivalent quality factor option." instead.

Applied with the suggested changes.
-- 
FFmpeg = Fierce & Freak Mega Problematic Efficient Gigant


More information about the ffmpeg-devel mailing list