Commit 7e44d3de authored by benoit's avatar benoit

Make some ffmpeg opts use parse-number-or-die.

Patch by Stefano Sabatini stefano sabatini-lala posteit


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@12919 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 4155708b
...@@ -2226,12 +2226,12 @@ static void opt_video_rc_override_string(const char *arg) ...@@ -2226,12 +2226,12 @@ static void opt_video_rc_override_string(const char *arg)
static void opt_me_threshold(const char *arg) static void opt_me_threshold(const char *arg)
{ {
me_threshold = atoi(arg); me_threshold = parse_number_or_die("me_threshold", arg, OPT_INT64, INT_MIN, INT_MAX);
} }
static void opt_verbose(const char *arg) static void opt_verbose(const char *arg)
{ {
verbose = atoi(arg); verbose = parse_number_or_die("v", arg, OPT_INT64, AV_LOG_QUIET, AV_LOG_DEBUG);
av_log_set_level(verbose); av_log_set_level(verbose);
} }
...@@ -2510,12 +2510,12 @@ static void opt_thread_count(const char *arg) ...@@ -2510,12 +2510,12 @@ static void opt_thread_count(const char *arg)
static void opt_audio_rate(const char *arg) static void opt_audio_rate(const char *arg)
{ {
audio_sample_rate = atoi(arg); audio_sample_rate = parse_number_or_die("ar", arg, OPT_INT64, 0, INT_MAX);
} }
static void opt_audio_channels(const char *arg) static void opt_audio_channels(const char *arg)
{ {
audio_channels = atoi(arg); audio_channels = parse_number_or_die("ac", arg, OPT_INT64, 0, INT_MAX);
} }
static void opt_video_channel(const char *arg) static void opt_video_channel(const char *arg)
......
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