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
This commit is contained in:
committed by
Robert Swain
parent
2ccf0a4290
commit
7542157d8a
11
cmdutils.c
11
cmdutils.c
@ -52,6 +52,17 @@ double parse_number_or_die(const char *context, const char *numstr, int type, do
|
||||
exit(1);
|
||||
}
|
||||
|
||||
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) {
|
||||
fprintf(stderr, "Invalid %s specification for %s: %s\n",
|
||||
is_duration ? "duration" : "date", context, timestr);
|
||||
exit(1);
|
||||
}
|
||||
return us;
|
||||
}
|
||||
|
||||
void show_help_options(const OptionDef *options, const char *msg, int mask, int value)
|
||||
{
|
||||
const OptionDef *po;
|
||||
|
Reference in New Issue
Block a user