diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-02-16 08:52:36 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-02-18 19:52:30 +0100 |
commit | 40c3fe2c0873feed2a345032205560c4a816271f (patch) | |
tree | c4054eef6adff2f29cfb232fa2358c8be480ce27 /cmdutils.c | |
parent | 0ebf475494837edd07fa6f58c540364795f9551c (diff) | |
download | ffmpeg-40c3fe2c0873feed2a345032205560c4a816271f.tar.gz |
Deprecate parse_date() in favor of av_parse_time().
The new av_parse_time() is created in libavutil/parseutils.h, all the
internal functions used by parse_date are moved to
libavutil/parseutils.c and made static.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit f6c7375a175ac649558aefab14f3895b2cb469aa)
Diffstat (limited to 'cmdutils.c')
-rw-r--r-- | cmdutils.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cmdutils.c b/cmdutils.c index b71272d255..e1532cb834 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -35,6 +35,7 @@ #include "libswscale/swscale.h" #include "libpostproc/postprocess.h" #include "libavutil/avstring.h" +#include "libavutil/parseutils.h" #include "libavutil/pixdesc.h" #include "libavutil/eval.h" #include "libavcodec/opt.h" @@ -113,8 +114,8 @@ double parse_number_or_die(const char *context, const char *numstr, int type, do int64_t parse_time_or_die(const char *context, const char *timestr, int is_duration) { - int64_t us = parse_date(timestr, is_duration); - if (us == INT64_MIN) { + int64_t us; + if (av_parse_time(&us, timestr, is_duration) < 0) { fprintf(stderr, "Invalid %s specification for %s: %s\n", is_duration ? "duration" : "date", context, timestr); exit(1); |