44 if (!memcmp(buf,
"[Script Info]", 13))
62 int hh1, mm1, ss1, ms1;
63 int hh2, mm2, ss2, ms2;
65 if (sscanf(p,
"Dialogue: %*[^,],%d:%d:%d%*c%d,%d:%d:%d%*c%d,%n",
66 &hh1, &mm1, &ss1, &ms1,
67 &hh2, &mm2, &ss2, &ms2, &pos) >= 8 && pos > 0) {
73 const int layer = atoi(p + 10);
75 end = (hh2*3600LL + mm2*60LL + ss2) * 100LL + ms2;
76 *start = (hh1*3600LL + mm1*60LL + ss1) * 100LL + ms1;
77 *duration = end - *
start;
83 while (dst->len > 0 &&
84 dst->str[dst->len - 1] ==
'\r' ||
85 dst->str[dst->len - 1] ==
'\n')
86 dst->str[--dst->len] = 0;
137 if (
read_dialogue(ass, &rline, line.str, &ts_start, &duration) < 0) {
171 int64_t min_ts, int64_t ts, int64_t max_ts,
int flags)
175 min_ts, ts, max_ts, flags);