diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2008-03-31 10:01:06 +0000 |
---|---|---|
committer | Robert Swain <robert.swain@gmail.com> | 2008-03-31 10:01:06 +0000 |
commit | 7542157d8afdf63a2cbc20a5e8aab86c85c42773 (patch) | |
tree | 3df705179d2d1cf8195f043079714bc66f9bb467 /cmdutils.h | |
parent | 2ccf0a42903e55d23588b2bc477bee0cf66a46dc (diff) | |
download | ffmpeg-7542157d8afdf63a2cbc20a5e8aab86c85c42773.tar.gz |
Export parse_time_or_die from ffmpeg.c to cmdutils.c
Patch by Stefano Sabatini (stefano sabatini-lala poste it)
Originally committed as revision 12647 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'cmdutils.h')
-rw-r--r-- | cmdutils.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/cmdutils.h b/cmdutils.h index d06a1f8e83..1e27d8fcc2 100644 --- a/cmdutils.h +++ b/cmdutils.h @@ -39,6 +39,22 @@ */ double parse_number_or_die(const char *context, const char *numstr, int type, double min, double max); +/** + * Parses a string specifying a time and returns its corresponding + * value as a number of microseconds. Exits from the application if + * the string cannot be correctly parsed. + * + * @param context the context of the value to be set (e.g. the + * corresponding commandline option name) + * @param timestr the string to be parsed + * @param is_duration a flag which tells how to interpret \p timestr, if + * not zero \p timestr is interpreted as a duration, otherwise as a + * date + * + * @see av_parse_date() + */ +int64_t parse_time_or_die(const char *context, const char *timestr, int is_duration); + typedef struct { const char *name; int flags; |