44 return memcmp(probe->
buf,
"ffconcat version 1.0", 20) ?
50 char *ret = *cursor += strspn(*cursor,
SPACE_CHARS);
61 const char *start = f;
65 if (!((
unsigned)((*f | 32) -
'a') < 26 ||
66 (
unsigned)(*f -
'0') < 10 || *f ==
'_' || *f ==
'-')) {
78 #define FAIL(retcode) do { ret = (retcode); goto fail; } while(0)
81 unsigned *nb_files_alloc)
92 url_len = strlen(avf->
filename) + strlen(filename) + 16;
98 if (cat->
nb_files >= *nb_files_alloc) {
99 size_t n =
FFMAX(*nb_files_alloc * 2, 16);
101 if (n <= cat->nb_files || n > SIZE_MAX /
sizeof(*cat->
files) ||
104 cat->
files = new_files;
109 memset(file, 0,
sizeof(*file));
156 int ret,
line = 0, i;
157 unsigned nb_files_alloc = 0;
168 if (!*keyword || *keyword ==
'#')
171 if (!strcmp(keyword,
"file")) {
177 if ((ret =
add_file(avf, filename, &file, &nb_files_alloc)) < 0)
179 }
else if (!strcmp(keyword,
"duration")) {
193 }
else if (!strcmp(keyword,
"ffconcat")) {
196 if (strcmp(ver_kw,
"version") || strcmp(ver_val,
"1.0")) {
211 for (i = 0; i < cat->
nb_files; i++) {
231 st->r_frame_rate = source_st->r_frame_rate;
279 #define OFFSET(x) offsetof(ConcatContext, x)
280 #define DEC AV_OPT_FLAG_DECODING_PARAM
283 {
"safe",
"enable safe mode",
304 .priv_class = &concat_class,