summaryrefslogtreecommitdiff
path: root/cmdutils.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2011-02-16 08:52:36 +0000
committerMans Rullgard <mans@mansr.com>2011-02-16 23:39:56 +0000
commitf6c7375a175ac649558aefab14f3895b2cb469aa (patch)
tree759bc4cc9757e5d1d9ab5d0cb661c96862d87737 /cmdutils.c
parent610219a598095f938705f200dfe3946455ef871a (diff)
downloadffmpeg-f6c7375a175ac649558aefab14f3895b2cb469aa.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>
Diffstat (limited to 'cmdutils.c')
-rw-r--r--cmdutils.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/cmdutils.c b/cmdutils.c
index 9809d2fe8a..514ebadb6e 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);