diff options
author | Marton Balint <cus@passwd.hu> | 2016-02-06 17:56:31 +0100 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2016-02-14 01:51:14 +0100 |
commit | ea1bf08a4c5a321a98d11bbe437713b82248ec4e (patch) | |
tree | 56c4d947267a1c2809544dcc5f91bdcacf204b92 /libavformat | |
parent | e942454daf050047142147f75743d1bb6b98d911 (diff) | |
download | ffmpeg-streaming-ea1bf08a4c5a321a98d11bbe437713b82248ec4e.zip ffmpeg-streaming-ea1bf08a4c5a321a98d11bbe437713b82248ec4e.tar.gz |
avformat/asfenc: use ff_parse_creation_time_metadata
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/asfenc.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/libavformat/asfenc.c b/libavformat/asfenc.c index a6a8242..14f92e2 100644 --- a/libavformat/asfenc.c +++ b/libavformat/asfenc.c @@ -388,7 +388,7 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size, { ASFContext *asf = s->priv_data; AVIOContext *pb = s->pb; - AVDictionaryEntry *tags[5], *t; + AVDictionaryEntry *tags[5]; int header_size, n, extra_size, extra_size2, wav_extra_size; int has_title, has_aspect_ratio = 0; int metadata_count; @@ -408,12 +408,9 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size, duration = asf->duration + PREROLL_TIME * 10000; has_title = tags[0] || tags[1] || tags[2] || tags[3] || tags[4]; - if (!file_size && (t = av_dict_get(s->metadata, "creation_time", NULL, 0))) { - if (av_parse_time(&asf->creation_time, t->value, 0) < 0) { - av_log(s, AV_LOG_WARNING, "Failed to parse creation_time %s\n", t->value); - asf->creation_time = 0; - } - av_dict_set(&s->metadata, "creation_time", NULL, 0); + if (!file_size) { + if (ff_parse_creation_time_metadata(s, &asf->creation_time, 0) != 0) + av_dict_set(&s->metadata, "creation_time", NULL, 0); } metadata_count = av_dict_count(s->metadata); |