| 210 | } |
| 211 | |
| 212 | static int mcc_parse_time_code(char **line_left, MCCTimecode *tc) |
| 213 | { |
| 214 | *tc = (MCCTimecode){ .field = 0, .line_number = 9 }; |
| 215 | int ret = mcc_parse_time_code_part(line_left, &tc->hh, 23, ":"); |
| 216 | if (ret < 0) |
| 217 | return ret; |
| 218 | ret = mcc_parse_time_code_part(line_left, &tc->mm, 59, ":"); |
| 219 | if (ret < 0) |
| 220 | return ret; |
| 221 | ret = mcc_parse_time_code_part(line_left, &tc->ss, 59, ":;"); |
| 222 | if (ret < 0) |
| 223 | return ret; |
| 224 | ret = mcc_parse_time_code_part(line_left, &tc->ff, 59, ".\t"); |
| 225 | if (ret < 0) |
| 226 | return ret; |
| 227 | if (ret == '.') { |
| 228 | ret = mcc_parse_time_code_part(line_left, &tc->field, 1, ",\t"); |
| 229 | if (ret < 0) |
| 230 | return ret; |
| 231 | if (ret == ',') { |
| 232 | ret = mcc_parse_time_code_part(line_left, &tc->line_number, 0xFFFF, "\t"); |
| 233 | if (ret < 0) |
| 234 | return ret; |
| 235 | } |
| 236 | } |
| 237 | if (ret != '\t') |
| 238 | return AVERROR_INVALIDDATA; |
| 239 | return 0; |
| 240 | } |
| 241 | |
| 242 | static int mcc_read_header(AVFormatContext *s) |
| 243 | { |
no test coverage detected