mov_write_mdat_tag(pb, mov);
}
- if (t = av_dict_get(s->metadata, "creation_time", NULL, 0)) {
- mov->time = ff_iso8601_to_unix_time(t->value);
- if (mov->time < 0) {
- av_log(s, AV_LOG_WARNING, "Failed to parse creation_time %s\n", t->value);
- mov->time = 0;
- }
- }
+ ff_parse_creation_time_metadata(s, &mov->time, 1);
if (mov->time)
mov->time += 0x7C25B080; // 1970 based -> 1904 based
* writing, so we re-open the same output, but for reading. It also avoids
* a read/seek/write/seek back and forth. */
avio_flush(s->pb);
- ret = avio_open(&read_pb, s->filename, AVIO_FLAG_READ);
+ ret = s->io_open(s, &read_pb, s->filename, AVIO_FLAG_READ, NULL);
if (ret < 0) {
av_log(s, AV_LOG_ERROR, "Unable to re-open %s output file for "
"the second pass (faststart)\n", s->filename);
avio_write(s->pb, read_buf[read_buf_id], n);
pos += n;
} while (pos < pos_end);
- avio_close(read_pb);
+ ff_format_io_close(s, &read_pb);
end:
av_free(buf);