Check that the value passed for an OPT_INT option is an int, fail otherwise. (cherry picked from commit 584c2f1db82fbb8024ba2b6b4c48397efedcc125) --- cmdutils.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/cmdutils.c b/cmdutils.c index cd4c05b..25b32ca 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -102,6 +102,8 @@ double parse_number_or_die(const char *context, const char *numstr, int type, do error= "The value for %s was %s which is not within %f - %f\n"; else if(type == OPT_INT64 && (int64_t)d != d) error= "Expected int64 for %s but found %s\n"; + else if (type == OPT_INT && (int)d != d) + error= "Expected int for %s but found %s\n"; else return d; fprintf(stderr, error, context, numstr, min, max);
_______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel