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

Function webvtt_write_time

libavformat/webvttenc.c:31–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29#include "mux.h"
30
31static void webvtt_write_time(AVIOContext *pb, int64_t millisec)
32{
33 int64_t sec, min, hour;
34 sec = millisec / 1000;
35 millisec -= 1000 * sec;
36 min = sec / 60;
37 sec -= 60 * min;
38 hour = min / 60;
39 min -= 60 * hour;
40
41 if (hour > 0)
42 avio_printf(pb, "%02"PRId64":", hour);
43
44 avio_printf(pb, "%02"PRId64":%02"PRId64".%03"PRId64"", min, sec, millisec);
45}
46
47static int webvtt_write_header(AVFormatContext *ctx)
48{

Callers 1

webvtt_write_packetFunction · 0.85

Calls 1

avio_printfFunction · 0.85

Tested by

no test coverage detected