mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-27 19:02:13 +08:00
lavf: factor out conversion of ISO8601 string to unix time
This commit is contained in:
@@ -3884,3 +3884,10 @@ void ff_make_absolute_url(char *buf, int size, const char *base,
|
||||
}
|
||||
av_strlcat(buf, rel, size);
|
||||
}
|
||||
|
||||
int64_t ff_iso8601_to_unix_time(const char *datestr)
|
||||
{
|
||||
struct tm time = {0};
|
||||
strptime(datestr, "%Y - %m - %dT%T", &time);
|
||||
return mktime(&time);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user