29 #define MAX_LINESIZE 2048
49 if (sscanf(ptr,
"{%*d}{}%c", &c) != 1 &&
50 sscanf(ptr,
"{%*d}{%*d}%c", &c) != 1 &&
51 sscanf(ptr,
"{DEFAULT}{}%c", &c) != 1)
63 if (sscanf(buf,
"{%d}{%c", &frame, &c) == 2)
72 if (sscanf(buf,
"{%d}{%d}", &frame_start, &frame_end) == 2)
77 static const char *
bom =
"\xEF\xBB\xBF";
96 char *
line = line_buf;
98 if (!strncmp(line,
bom, 3))
104 line[strcspn(line,
"\r\n")] = 0;
110 if ((sscanf(line,
"{%d}{}%6lf", &frame, &fps) == 2 ||
111 sscanf(line,
"{%d}{%*d}%6lf", &frame, &fps) == 2)
112 && frame <= 1 && fps > 3 && fps < 100) {
113 pts_info =
av_d2q(fps, 100000);
116 if (!st->
codec->
extradata && sscanf(line,
"{DEFAULT}{}%c", &c) == 1) {
124 #define SKIP_FRAME_ID \
125 p = strchr(p, '}'); \
127 av_log(s, AV_LOG_WARNING, "Invalid event \"%s\"" \
128 " at line %d\n", line, i); \
164 int64_t min_ts, int64_t ts, int64_t max_ts,
int flags)
168 min_ts, ts, max_ts, flags);
179 #define OFFSET(x) offsetof(MicroDVDContext, x)
180 #define SD AV_OPT_FLAG_SUBTITLE_PARAM|AV_OPT_FLAG_DECODING_PARAM
202 .priv_class = µdvd_class,