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

Function format_date

libavformat/dashenc.c:644–660  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

642}
643
644static void format_date(char *buf, int size, int64_t time_us)
645{
646 struct tm *ptm, tmbuf;
647 int64_t time_ms = time_us / 1000;
648 const time_t time_s = time_ms / 1000;
649 int millisec = time_ms - (time_s * 1000);
650 ptm = gmtime_r(&time_s, &tmbuf);
651 if (ptm) {
652 int len;
653 if (!strftime(buf, size, "%Y-%m-%dT%H:%M:%S", ptm)) {
654 buf[0] = '\0';
655 return;
656 }
657 len = strlen(buf);
658 snprintf(buf + len, size - len, ".%03dZ", millisec);
659 }
660}
661
662static int write_adaptation_set(AVFormatContext *s, AVIOContext *out, int as_index,
663 int final)

Callers 2

write_manifestFunction · 0.85
dash_write_packetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected