(sscanf(ptr, "@%u @%u %c", &fs, &fe, &c) == 3 && fs < fe));
}
-static int jacosub_probe(AVProbeData *p)
+static int jacosub_probe(const AVProbeData *p)
{
const char *ptr = p->buf;
const char *ptr_end = p->buf + p->buf_size;
ts_start = (ts_start + jacosub->shift) * 100 / jacosub->timeres;
ts_end = (ts_end + jacosub->shift) * 100 / jacosub->timeres;
*start = ts_start;
- *duration = ts_start + ts_end;
+ *duration = ts_end - ts_start;
return buf + len;
}