From 568c70e79ee267426c15ef4603c69703f6a5884a Mon Sep 17 00:00:00 2001 From: Mans Rullgard Date: Tue, 24 Jul 2012 14:14:01 +0100 Subject: lavfi: convert input/ouput list compound literals to named objects A number of compilers, for example those from TI and IBM, choke on these initialisers. The current style is also quite ugly. Signed-off-by: Mans Rullgard --- libavfilter/vf_overlay.c | 62 +++++++++++++++++++++++++++++------------------- 1 file changed, 38 insertions(+), 24 deletions(-) (limited to 'libavfilter/vf_overlay.c') diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c index f0b58427a7..e8ff834dbb 100644 --- a/libavfilter/vf_overlay.c +++ b/libavfilter/vf_overlay.c @@ -374,6 +374,42 @@ static int request_frame(AVFilterLink *outlink) return output_frame(ctx); } +static const AVFilterPad avfilter_vf_overlay_inputs[] = { + { + .name = "main", + .type = AVMEDIA_TYPE_VIDEO, + .start_frame = null_start_frame, + .config_props = config_input_main, + .draw_slice = null_draw_slice, + .end_frame = end_frame_main, + .min_perms = AV_PERM_READ, + .rej_perms = AV_PERM_REUSE2 | AV_PERM_PRESERVE, + .needs_fifo = 1, + }, + { + .name = "overlay", + .type = AVMEDIA_TYPE_VIDEO, + .start_frame = null_start_frame, + .config_props = config_input_overlay, + .draw_slice = null_draw_slice, + .end_frame = end_frame_overlay, + .min_perms = AV_PERM_READ, + .rej_perms = AV_PERM_REUSE2, + .needs_fifo = 1, + }, + { NULL } +}; + +static const AVFilterPad avfilter_vf_overlay_outputs[] = { + { + .name = "default", + .type = AVMEDIA_TYPE_VIDEO, + .config_props = config_output, + .request_frame = request_frame, + }, + { NULL } +}; + AVFilter avfilter_vf_overlay = { .name = "overlay", .description = NULL_IF_CONFIG_SMALL("Overlay a video source on top of the input."), @@ -385,28 +421,6 @@ AVFilter avfilter_vf_overlay = { .query_formats = query_formats, - .inputs = (const AVFilterPad[]) {{ .name = "main", - .type = AVMEDIA_TYPE_VIDEO, - .start_frame = null_start_frame, - .config_props = config_input_main, - .draw_slice = null_draw_slice, - .end_frame = end_frame_main, - .min_perms = AV_PERM_READ, - .rej_perms = AV_PERM_REUSE2|AV_PERM_PRESERVE, - .needs_fifo = 1, }, - { .name = "overlay", - .type = AVMEDIA_TYPE_VIDEO, - .start_frame = null_start_frame, - .config_props = config_input_overlay, - .draw_slice = null_draw_slice, - .end_frame = end_frame_overlay, - .min_perms = AV_PERM_READ, - .rej_perms = AV_PERM_REUSE2, - .needs_fifo = 1, }, - { .name = NULL}}, - .outputs = (const AVFilterPad[]) {{ .name = "default", - .type = AVMEDIA_TYPE_VIDEO, - .config_props = config_output, - .request_frame = request_frame, }, - { .name = NULL}}, + .inputs = avfilter_vf_overlay_inputs, + .outputs = avfilter_vf_overlay_outputs, }; -- cgit v1.2.3