diff options
author | Anton Khirnov <anton@khirnov.net> | 2011-07-13 11:45:17 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2011-07-13 12:14:25 +0200 |
commit | 001d668d40b5f87d19271c7d5521368b5187425b (patch) | |
tree | 0812bd4345eff2b6aa09a664064c4cc643d69321 /libavformat/dvenc.c | |
parent | b21e6b707fbc80511f4886d3b272a77b86157a2d (diff) | |
download | ffmpeg-001d668d40b5f87d19271c7d5521368b5187425b.tar.gz |
lavf: factor out conversion of ISO8601 string to unix time
Diffstat (limited to 'libavformat/dvenc.c')
-rw-r--r-- | libavformat/dvenc.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/libavformat/dvenc.c b/libavformat/dvenc.c index 1e59bd9cc7..5aab6837c5 100644 --- a/libavformat/dvenc.c +++ b/libavformat/dvenc.c @@ -343,11 +343,8 @@ static DVMuxContext* dv_init_mux(AVFormatContext* s) c->start_time = s->timestamp; else #endif - if (t = av_dict_get(s->metadata, "creation_time", NULL, 0)) { - struct tm time = {0}; - strptime(t->value, "%Y - %m - %dT%T", &time); - c->start_time = mktime(&time); - } + if (t = av_dict_get(s->metadata, "creation_time", NULL, 0)) + c->start_time = ff_iso8601_to_unix_time(t->value); for (i=0; i < c->n_ast; i++) { if (c->ast[i] && !(c->audio_data[i]=av_fifo_alloc(100*AVCODEC_MAX_AUDIO_FRAME_SIZE))) { |