[FFmpeg-devel] [PATCH] Implement the function cmdutils.c:parse_int_or_die

D. Hugh Redelmeier hugh
Sun Feb 17 19:40:47 CET 2008

| From: Michael Niedermayer <michaelni at gmx.at>

| Id prefer
| double parse_number_or_die(const char* numstr, int type, double min, double max, const char* error);
| d= parse_number_or_die("12234", OPT_INT, 1, 100, "blah blah");

I really really distrust using floating point when integers are
expected.  (To be honest, I distrust using floating point for anything
where an exact result is expected.)

Do we really want to allow "3.9" when the context calls for an integer?

Theoretically, a C implementation could have some ints that are not
representable as doubles.  I don't think that such an implementation
exists, but it still makes me uncomforable.

More information about the ffmpeg-devel mailing list