aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2008-06-12 21:21:28 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2008-06-12 21:21:28 +0000
commitd18811bbf541cc55ac2e36bc34c7c2f541a388cb (patch)
treef2b0cfd33dba7da49a112749f4a07103e9a8e5dc /ffmpeg.c
parentb81d6235c059e94ba7d07f846d5e1a6f1b825859 (diff)
downloadffmpeg-d18811bbf541cc55ac2e36bc34c7c2f541a388cb.tar.gz
Make ffmpeg.c:opt_thread use parse_number_or_die().
Originally committed as revision 13758 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 05bac3a3f9..4490320d26 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2507,13 +2507,14 @@ static void opt_top_field_first(const char *arg)
top_field_first= atoi(arg);
}
-static void opt_thread_count(const char *arg)
+static int opt_thread_count(const char *opt, const char *arg)
{
- thread_count= atoi(arg);
+ thread_count= parse_number_or_die(opt, arg, OPT_INT64, 0, INT_MAX);
#if !defined(HAVE_THREADS)
if (verbose >= 0)
fprintf(stderr, "Warning: not compiled with thread support, using thread emulation\n");
#endif
+ return 0;
}
static int opt_audio_rate(const char *opt, const char *arg)
@@ -3683,7 +3684,7 @@ static const OptionDef options[] = {
{ "loop_output", HAS_ARG | OPT_INT | OPT_EXPERT, {(void*)&loop_output}, "number of times to loop output in formats that support looping (0 loops forever)", "" },
{ "v", HAS_ARG | OPT_FUNC2, {(void*)opt_verbose}, "set the logging verbosity level", "number" },
{ "target", HAS_ARG, {(void*)opt_target}, "specify target file type (\"vcd\", \"svcd\", \"dvd\", \"dv\", \"dv50\", \"pal-vcd\", \"ntsc-svcd\", ...)", "type" },
- { "threads", HAS_ARG | OPT_EXPERT, {(void*)opt_thread_count}, "thread count", "count" },
+ { "threads", OPT_FUNC2 | HAS_ARG | OPT_EXPERT, {(void*)opt_thread_count}, "thread count", "count" },
{ "vsync", HAS_ARG | OPT_INT | OPT_EXPERT, {(void*)&video_sync_method}, "video sync method", "" },
{ "async", HAS_ARG | OPT_INT | OPT_EXPERT, {(void*)&audio_sync_method}, "audio sync method", "" },
{ "adrift_threshold", HAS_ARG | OPT_FLOAT | OPT_EXPERT, {(void*)&audio_drift_threshold}, "audio drift threshold", "threshold" },