On date Sunday 2011-06-12 14:19:22 +0200, Anton Khirnov encoded: > > On Sun, 12 Jun 2011 13:54:22 +0200, Stefano Sabatini > <[email protected]> wrote: > > Fix ffplay -i FILE, which was recently broken. > > --- > > cmdutils.c | 2 +- > > 1 files changed, 1 insertions(+), 1 deletions(-) > > > > diff --git a/cmdutils.c b/cmdutils.c > > index b9a5d1b..c73d5a1 100644 > > --- a/cmdutils.c > > +++ b/cmdutils.c > > @@ -277,7 +277,7 @@ unknown_opt: > > *po->u.int64_arg = parse_number_or_die(opt, arg, > > OPT_INT64, INT64_MIN, INT64_MAX); > > } else if (po->flags & OPT_FLOAT) { > > *po->u.float_arg = parse_number_or_die(opt, arg, > > OPT_FLOAT, -INFINITY, INFINITY); > > - } else { > > + } else if (po->u.func_arg) { > > if (po->u.func_arg(opt, arg) < 0) { > > fprintf(stderr, "%s: failed to set value '%s' for > > option '%s'\n", argv[0], arg, opt); > > exit(1); > > -- > > 1.7.2.5 > > > > Hah, you beat me to it. > Patch ok.
BTW you may also consider to cherry pick these from FFmpeg: commit 96f931adf75967dc86fbf3ee21517e539d0a6e50 Author: Stefano Sabatini <[email protected]> Date: Sat Jun 4 23:54:19 2011 +0200 cmdutils: change the signature of the function argument in parse_options() This is required for a pending simplification. commit b4af3cf3470a14626e5d2f40ce3c88bfdd0c8561 Author: Stefano Sabatini <[email protected]> Date: Sun Jun 5 00:03:59 2011 +0200 cmdutils: remove unnecessary OPT_DUMMY implementation The -i INPUT option can be implemented more cleanly by using a function option, which can easily be done now that the parse_arg_function passed to parse_options has a standard signature. which allows imo a cleaner and more robust implementation. _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
