MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / ff_parse_creation_time_metadata

Function ff_parse_creation_time_metadata

libavformat/mux_utils.c:137–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135}
136
137int ff_parse_creation_time_metadata(AVFormatContext *s, int64_t *timestamp, int return_seconds)
138{
139 AVDictionaryEntry *entry;
140 int64_t parsed_timestamp;
141 int ret;
142 if ((entry = av_dict_get(s->metadata, "creation_time", NULL, 0))) {
143 if ((ret = av_parse_time(&parsed_timestamp, entry->value, 0)) >= 0) {
144 *timestamp = return_seconds ? parsed_timestamp / 1000000 : parsed_timestamp;
145 return 1;
146 } else {
147 av_log(s, AV_LOG_WARNING, "Failed to parse creation_time %s\n", entry->value);
148 return ret;
149 }
150 }
151 return 0;
152}
153
154int ff_standardize_creation_time(AVFormatContext *s)
155{

Callers 7

mxf_initFunction · 0.85
asf_write_header1Function · 0.85
dv_init_muxFunction · 0.85
mov_write_headerFunction · 0.85
mkv_write_infoFunction · 0.85

Calls 3

av_dict_getFunction · 0.85
av_parse_timeFunction · 0.85
av_logFunction · 0.85

Tested by

no test coverage detected