42 if (!memcmp(buf,
"[Script Info]", 13))
58 int hh1, mm1, ss1, ms1;
59 int hh2, mm2, ss2, ms2;
61 if (sscanf(p,
"%*[^,],%d:%d:%d%*c%d,%d:%d:%d%*c%d",
62 &hh1, &mm1, &ss1, &ms1,
63 &hh2, &mm2, &ss2, &ms2) == 8) {
64 end = (hh2*3600LL + mm2*60LL + ss2) * 100LL + ms2;
65 *start = (hh1*3600LL + mm1*60LL + ss1) * 100LL + ms1;
66 *duration = end - *
start;
92 int header_remaining, res = 0;
104 header_remaining = INT_MAX;
115 if (!memcmp(line.str,
"[Events]", 8))
116 header_remaining = 2;
117 else if (line.str[0] ==
'[')
118 header_remaining = INT_MAX;
120 if (header_remaining) {
128 if (
read_ts(line.str, &ts_start, &duration) < 0)
160 int64_t min_ts, int64_t ts, int64_t max_ts,
int flags)
164 min_ts, ts, max_ts, flags);