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_pad.c | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) (limited to 'libavfilter/vf_pad.c') diff --git a/libavfilter/vf_pad.c b/libavfilter/vf_pad.c index a852b0db5c..1ab6ed57f3 100644 --- a/libavfilter/vf_pad.c +++ b/libavfilter/vf_pad.c @@ -434,6 +434,28 @@ static int draw_slice(AVFilterLink *link, int y, int h, int slice_dir) return draw_send_bar_slice(link, y, h, slice_dir, -1); } +static const AVFilterPad avfilter_vf_pad_inputs[] = { + { + .name = "default", + .type = AVMEDIA_TYPE_VIDEO, + .config_props = config_input, + .get_video_buffer = get_video_buffer, + .start_frame = start_frame, + .draw_slice = draw_slice, + .end_frame = end_frame, + }, + { NULL } +}; + +static const AVFilterPad avfilter_vf_pad_outputs[] = { + { + .name = "default", + .type = AVMEDIA_TYPE_VIDEO, + .config_props = config_output, + }, + { NULL } +}; + AVFilter avfilter_vf_pad = { .name = "pad", .description = NULL_IF_CONFIG_SMALL("Pad input image to width:height[:x:y[:color]] (default x and y: 0, default color: black)."), @@ -443,17 +465,7 @@ AVFilter avfilter_vf_pad = { .uninit = uninit, .query_formats = query_formats, - .inputs = (const AVFilterPad[]) {{ .name = "default", - .type = AVMEDIA_TYPE_VIDEO, - .config_props = config_input, - .get_video_buffer = get_video_buffer, - .start_frame = start_frame, - .draw_slice = draw_slice, - .end_frame = end_frame, }, - { .name = NULL}}, - - .outputs = (const AVFilterPad[]) {{ .name = "default", - .type = AVMEDIA_TYPE_VIDEO, - .config_props = config_output, }, - { .name = NULL}}, + .inputs = avfilter_vf_pad_inputs, + + .outputs = avfilter_vf_pad_outputs, }; -- cgit v1.2.3