39 const unsigned char *ptr = p->
buf;
40 const unsigned char *ptr_end = ptr + p->
buf_size;
42 for (i = 0; i < 2; i++) {
43 if (sscanf(ptr,
"[%"SCNd64
"][%"SCNd64
"]%c", &start, &end, &c) != 3 &&
44 sscanf(ptr,
"[%"SCNd64
"][]%c", &start, &c) != 2)
59 if (sscanf(*line,
"[%"SCNd64
"][]%c%n",
60 pts_start, &c, &len) >= 2) {
65 if (sscanf(*line,
"[%"SCNd64
"][%"SCNd64
"]%c%n",
66 pts_start, &end, &c, &len) >= 3) {
67 *duration = end - *pts_start;
97 line[strcspn(line,
"\r\n")] = 0;
99 if (!
read_ts(&p, &pts_start, &duration)) {
106 sub->
pts = pts_start;
122 int64_t min_ts, int64_t ts, int64_t max_ts,
int flags)
126 min_ts, ts, max_ts, flags);
145 .extensions =
"txt,mpl2",