| 135 | } |
| 136 | |
| 137 | int 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 | |
| 154 | int ff_standardize_creation_time(AVFormatContext *s) |
| 155 | { |
no test coverage detected