36 const char *ptr = p->
buf;
39 while (ptr < ptr_end) {
40 if (!memcmp(ptr,
"FORMAT=TIME", 11))
42 if (!memcmp(ptr,
"FORMAT=", 7))
44 ptr += strcspn(ptr,
"\n") + 1;
56 float multiplier = 100.0;
57 float current_pts = 0;
69 line[strcspn(line,
"\r\n")] = 0;
71 if (sscanf(line,
"FORMAT=%d", &fps) == 1 && fps > 3 && fps < 100) {
75 }
else if (sscanf(line,
"%f %f", &start, &duration) == 2) {
86 sub->
pts = (int64_t)(current_pts + start*multiplier);
87 sub->
duration = (int)(duration * multiplier);
88 current_pts += (start +
duration) * multiplier;
115 int64_t min_ts, int64_t ts, int64_t max_ts,
int flags)
119 min_ts, ts, max_ts, flags);