34 const char *header=
"[Script Info]";
36 if( !memcmp(p->
buf , header, strlen(header))
37 || !memcmp(p->
buf+3, header, strlen(header)))
53 int hh1, mm1, ss1, ms1;
54 int hh2, mm2, ss2, ms2;
56 if (sscanf(p,
"%*[^,],%d:%d:%d%*c%d,%d:%d:%d%*c%d",
57 &hh1, &mm1, &ss1, &ms1,
58 &hh2, &mm2, &ss2, &ms2) == 8) {
59 end = (hh2*3600LL + mm2*60LL + ss2) * 100LL + ms2;
60 *start = (hh1*3600LL + mm1*60LL + ss1) * 100LL + ms1;
61 *duration = end - *
start;
87 int header_remaining,
res = 0;
97 header_remaining= INT_MAX;
108 if (!memcmp(line.str,
"[Events]", 8))
110 else if (line.str[0]==
'[')
111 header_remaining= INT_MAX;
113 if (header_remaining) {
121 if (
read_ts(line.str, &ts_start, &duration) < 0)
153 int64_t min_ts, int64_t ts, int64_t max_ts,
int flags)
157 min_ts, ts, max_ts, flags);