[FFmpeg-devel] [PATCH] parse_options(): Avoid passing NULL as a string arg to fprintf

Stefano Sabatini stefano.sabatini-lala at poste.it
Thu Jun 30 10:40:59 CEST 2011


On date Wednesday 2011-06-29 12:53:51 -0400, Jeff Downs encoded:
> On Fri, 24 Jun 2011, Stefano Sabatini wrote:
> 
> > [...]
> > I suppose the right fix would be to change the signatures of the
> > cmdutils.c:* function with the mismatching signatures, maybe prefix
> > them with "opt_" to make clear that they're opt functions.
> > 
> 
> See below; this one takes care of them all I believe.
> I tested it on Solaris; the options previously spitting out errors in the 
> case of legitimate command line arguments (-pix_fmts for example) no 
> longer do so with this applied.
> 
> 
> 
> 
> From 7a99100db7274435713a56e92af7ff85e1ad5ab9 Mon Sep 17 00:00:00 2001
> From: Jeff Downs <heydowns at somuchpressure.net>
> Date: Wed, 29 Jun 2011 12:38:46 -0400
> Subject: [PATCH] Make all option parsing functions match the function pointer type through which they are called.
> 
> All option parsing functions now match the function pointer signature through
> which they are called (int f(const char *, const char *), thereby working
> reliably on all platforms.
> Prefix all option processing functions with opt_
> ---
>  cmdutils.c             |   24 ++++++++++++++++--------
>  cmdutils.h             |   26 +++++++++++++++++---------
>  cmdutils_common_opts.h |   24 ++++++++++++------------
>  ffmpeg.c               |   14 +++++++++-----
>  ffplay.c               |    5 +++--
>  ffprobe.c              |    3 ++-
>  ffserver.c             |    3 ++-
>  7 files changed, 61 insertions(+), 38 deletions(-)

Looks fine to me, I'll apply soon if I see no more comments, and
thanks.
-- 
FFmpeg = Frightening and Fascinating Meaningful Purposeless Eretic Governor


More information about the ffmpeg-devel mailing list