diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-05-06 16:40:53 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-05-10 07:30:31 +0200 |
commit | d78838414b8362a7aa7c27abacee1f6ca036199c (patch) | |
tree | 5685c2949db1ed148c3df2bb42952c0d8e7274e8 /libavformat/utils.c | |
parent | 533836b8e0e5693b3d3e8403666ce216687d51b3 (diff) | |
download | ffmpeg-d78838414b8362a7aa7c27abacee1f6ca036199c.tar.gz |
avformat/utils: Move creation-time functions to mux_utils
Only used by muxers.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index cc5507a19e..a695f19b03 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -29,7 +29,6 @@ #include "libavutil/dict.h" #include "libavutil/internal.h" #include "libavutil/opt.h" -#include "libavutil/parseutils.h" #include "libavutil/pixfmt.h" #include "libavutil/thread.h" #include "libavutil/time.h" @@ -1689,32 +1688,6 @@ int ff_is_http_proto(const char *filename) { return proto ? (!av_strcasecmp(proto, "http") || !av_strcasecmp(proto, "https")) : 0; } -int ff_parse_creation_time_metadata(AVFormatContext *s, int64_t *timestamp, int return_seconds) -{ - AVDictionaryEntry *entry; - int64_t parsed_timestamp; - int ret; - if ((entry = av_dict_get(s->metadata, "creation_time", NULL, 0))) { - if ((ret = av_parse_time(&parsed_timestamp, entry->value, 0)) >= 0) { - *timestamp = return_seconds ? parsed_timestamp / 1000000 : parsed_timestamp; - return 1; - } else { - av_log(s, AV_LOG_WARNING, "Failed to parse creation_time %s\n", entry->value); - return ret; - } - } - return 0; -} - -int ff_standardize_creation_time(AVFormatContext *s) -{ - int64_t timestamp; - int ret = ff_parse_creation_time_metadata(s, ×tamp, 0); - if (ret == 1) - return avpriv_dict_set_timestamp(&s->metadata, "creation_time", timestamp); - return ret; -} - int ff_bprint_to_codecpar_extradata(AVCodecParameters *par, struct AVBPrint *buf) { int ret; |