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

Function time_tracker_set_time

libavformat/mccdec.c:142–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140} MCCTimecode;
141
142static int time_tracker_set_time(TimeTracker *tt, const MCCTimecode *tc, void *log_ctx)
143{
144 AVTimecode last = tt->timecode;
145 int ret = av_timecode_init_from_components(&tt->timecode, last.rate, last.flags, tc->hh, tc->mm, tc->ss, tc->ff, log_ctx);
146 if (ret < 0) {
147 tt->timecode = last;
148 return ret;
149 }
150 tt->last_ts -= last.start;
151 tt->last_ts += tt->timecode.start;
152 if (tt->timecode.start < last.start)
153 tt->last_ts += tt->twenty_four_hr;
154 return 0;
155}
156
157struct ValidTimeCodeRate {
158 AVRational rate;

Callers 1

mcc_read_headerFunction · 0.85

Calls 1

Tested by

no test coverage detected