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

Function mcc_parse_time_code_part

libavformat/mccdec.c:193–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191}
192
193static int mcc_parse_time_code_part(char **line_left, unsigned *value, unsigned max, const char *after_set)
194{
195 *value = 0;
196 if (!av_isdigit(**line_left))
197 return AVERROR_INVALIDDATA;
198 while (av_isdigit(**line_left)) {
199 unsigned digit = **line_left - '0';
200 *value = *value * 10 + digit;
201 ++*line_left;
202 if (*value > max)
203 return AVERROR_INVALIDDATA;
204 }
205 unsigned char after = **line_left;
206 if (!after || !strchr(after_set, after))
207 return AVERROR_INVALIDDATA;
208 ++*line_left;
209 return after;
210}
211
212static int mcc_parse_time_code(char **line_left, MCCTimecode *tc)
213{

Callers 1

mcc_parse_time_codeFunction · 0.85

Calls 1

av_isdigitFunction · 0.85

Tested by

no test coverage detected