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

Function av_timecode_init_from_string

libavutil/timecode.c:241–254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239}
240
241int av_timecode_init_from_string(AVTimecode *tc, AVRational rate, const char *str, void *log_ctx)
242{
243 char c;
244 int hh, mm, ss, ff, flags;
245
246 if (sscanf(str, "%d:%d:%d%c%d", &hh, &mm, &ss, &c, &ff) != 5) {
247 av_log(log_ctx, AV_LOG_ERROR, "Unable to parse timecode, "
248 "syntax: hh:mm:ss[:;.]ff\n");
249 return AVERROR_INVALIDDATA;
250 }
251 flags = c != ':' ? AV_TIMECODE_FLAG_DROPFRAME : 0; // drop if ';', '.', ...
252
253 return av_timecode_init_from_components(tc, rate, flags, hh, mm, ss, ff, log_ctx);
254}

Callers 6

segment_endFunction · 0.85
mxf_init_timecodeFunction · 0.85
dv_write_headerFunction · 0.85
mov_check_timecode_trackFunction · 0.85
encode_initFunction · 0.85
initFunction · 0.85

Calls 2

av_logFunction · 0.85

Tested by

no test coverage detected