36 const char *ptr = p->
buf;
39 while (ptr < ptr_end) {
42 if (!memcmp(ptr,
"FORMAT=TIME", 11))
44 if (!memcmp(ptr,
"FORMAT=", 7))
61 float multiplier = 100.0;
62 float current_pts = 0;
74 line[strcspn(line,
"\r\n")] = 0;
76 if (sscanf(line,
"FORMAT=%d", &fps) == 1 && fps > 3 && fps < 100) {
80 }
else if (sscanf(line,
"%f %f", &start, &duration) == 2) {
91 sub->
pts = (int64_t)(current_pts + start*multiplier);
92 sub->
duration = (int)(duration * multiplier);
93 current_pts += (start +
duration) * multiplier;
120 int64_t min_ts, int64_t ts, int64_t max_ts,
int flags)
124 min_ts, ts, max_ts, flags);