On Mon, May 09, 2011 at 19:49:32 (CEST), Anton Khirnov wrote: > From: Benjamin Larsson <benja...@southpole.se> > > Signed-off-by: Michael Niedermayer <michae...@gmx.at> > Signed-off-by: Anton Khirnov <an...@khirnov.net> > --- > cmdutils.c | 2 ++ > cmdutils.h | 1 + > ffplay.c | 1 + > 3 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/cmdutils.c b/cmdutils.c > index f770c79..aabd2b2 100644 > --- a/cmdutils.c > +++ b/cmdutils.c > @@ -279,6 +279,8 @@ unknown_opt: > fprintf(stderr, "%s: failed to set value '%s' for option > '%s'\n", argv[0], arg, opt); > exit(1); > } > + } else if (po->flags & OPT_DUMMY) { > + /* Do nothing for this option */ > } else { > po->u.func_arg(arg); > } > diff --git a/cmdutils.h b/cmdutils.h > index 0a61efb..335b23f 100644 > --- a/cmdutils.h > +++ b/cmdutils.h > @@ -123,6 +123,7 @@ typedef struct { > #define OPT_INT64 0x0800 > #define OPT_EXIT 0x1000 > #define OPT_DATA 0x2000 > +#define OPT_DUMMY 0x4000 > union { > void (*func_arg)(const char *); //FIXME passing error code as int > return would be nicer then exit() in the func > int *int_arg; > diff --git a/ffplay.c b/ffplay.c > index a094319..749c790 100644 > --- a/ffplay.c > +++ b/ffplay.c > @@ -3017,6 +3017,7 @@ static const OptionDef options[] = { > #endif > { "rdftspeed", OPT_INT | HAS_ARG| OPT_AUDIO | OPT_EXPERT, > {(void*)&rdftspeed}, "rdft speed", "msecs" }, > { "default", OPT_FUNC2 | HAS_ARG | OPT_AUDIO | OPT_VIDEO | OPT_EXPERT, > {(void*)opt_default}, "generic catch all option", "" }, > + { "i", OPT_DUMMY, NULL, "ffmpeg compatibility dummy option", ""}, > { NULL, }, > };
I like this as this has bugged me in the past as, too. -- Gruesse/greetings, Reinhard Tartler, KeyID 945348A4 _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel