Commit c7193373 authored by Diego Biurrun's avatar Diego Biurrun
Browse files

Make ffplay use parse_number_or_die instead of atoi.

Stefano Sabatini, stefano.sabatini-lala poste it

Originally committed as revision 12366 to svn://
parent 69ed2c3b
......@@ -2366,20 +2366,12 @@ static void opt_frame_size(const char *arg)
static void opt_width(const char *arg)
screen_width = atoi(arg);
fprintf(stderr, "invalid width\n");
screen_width = parse_number_or_die("x", arg, OPT_INT64, 1, INT_MAX);
static void opt_height(const char *arg)
screen_height = atoi(arg);
fprintf(stderr, "invalid height\n");
screen_height = parse_number_or_die("y", arg, OPT_INT64, 1, INT_MAX);
static void opt_format(const char *arg)
......@@ -2422,17 +2414,17 @@ static void opt_seek(const char *arg)
static void opt_debug(const char *arg)
debug = atoi(arg);
debug = parse_number_or_die("debug", arg, OPT_INT64, 0, INT_MAX);
static void opt_vismv(const char *arg)
debug_mv = atoi(arg);
debug_mv = parse_number_or_die("vismv", arg, OPT_INT64, INT_MIN, INT_MAX);
static void opt_thread_count(const char *arg)
thread_count= atoi(arg);
thread_count= parse_number_or_die("threads", arg, OPT_INT64, 0, INT_MAX);
#if !defined(HAVE_THREADS)
fprintf(stderr, "Warning: not compiled with thread support, using thread emulation\n");
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment