} ConcatContext;
#define OFFSET(x) offsetof(ConcatContext, x)
+#define A AV_OPT_FLAG_AUDIO_PARAM
+#define F AV_OPT_FLAG_FILTERING_PARAM
+#define V AV_OPT_FLAG_VIDEO_PARAM
static const AVOption concat_options[] = {
{ "n", "specify the number of segments", OFFSET(nb_segments),
- AV_OPT_TYPE_INT, { .dbl = 2 }, 2, INT_MAX },
+ AV_OPT_TYPE_INT, { .dbl = 2 }, 2, INT_MAX, V|A|F},
{ "v", "specify the number of video streams",
OFFSET(nb_streams[AVMEDIA_TYPE_VIDEO]),
- AV_OPT_TYPE_INT, { .dbl = 1 }, 0, INT_MAX },
+ AV_OPT_TYPE_INT, { .dbl = 1 }, 0, INT_MAX, V|F },
{ "a", "specify the number of audio streams",
OFFSET(nb_streams[AVMEDIA_TYPE_AUDIO]),
- AV_OPT_TYPE_INT, { .dbl = 0 }, 0, INT_MAX },
+ AV_OPT_TYPE_INT, { .dbl = 0 }, 0, INT_MAX, A|F},
{ 0 }
};
for (str = 0; str < cat->nb_streams[type]; str++) {
AVFilterPad pad = {
.type = type,
- .min_perms = AV_PERM_READ,
- .rej_perms = AV_PERM_REUSE2,
+ .min_perms = AV_PERM_READ | AV_PERM_PRESERVE,
.get_video_buffer = get_video_buffer,
.get_audio_buffer = get_audio_buffer,
};
.priv_size = sizeof(ConcatContext),
.inputs = (const AVFilterPad[]) { { .name = NULL } },
.outputs = (const AVFilterPad[]) { { .name = NULL } },
+ .priv_class = &concat_class,
};