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_crop.c | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) (limited to 'libavfilter/vf_crop.c') diff --git a/libavfilter/vf_crop.c b/libavfilter/vf_crop.c index 839376744c..0270a13e2c 100644 --- a/libavfilter/vf_crop.c +++ b/libavfilter/vf_crop.c @@ -326,6 +326,28 @@ static int end_frame(AVFilterLink *link) return ff_end_frame(link->dst->outputs[0]); } +static const AVFilterPad avfilter_vf_crop_inputs[] = { + { + .name = "default", + .type = AVMEDIA_TYPE_VIDEO, + .start_frame = start_frame, + .draw_slice = draw_slice, + .end_frame = end_frame, + .get_video_buffer = ff_null_get_video_buffer, + .config_props = config_input, + }, + { NULL } +}; + +static const AVFilterPad avfilter_vf_crop_outputs[] = { + { + .name = "default", + .type = AVMEDIA_TYPE_VIDEO, + .config_props = config_output, + }, + { NULL } +}; + AVFilter avfilter_vf_crop = { .name = "crop", .description = NULL_IF_CONFIG_SMALL("Crop the input video to width:height:x:y."), @@ -336,16 +358,6 @@ AVFilter avfilter_vf_crop = { .init = init, .uninit = uninit, - .inputs = (const AVFilterPad[]) {{ .name = "default", - .type = AVMEDIA_TYPE_VIDEO, - .start_frame = start_frame, - .draw_slice = draw_slice, - .end_frame = end_frame, - .get_video_buffer = ff_null_get_video_buffer, - .config_props = config_input, }, - { .name = NULL}}, - .outputs = (const AVFilterPad[]) {{ .name = "default", - .type = AVMEDIA_TYPE_VIDEO, - .config_props = config_output, }, - { .name = NULL}}, + .inputs = avfilter_vf_crop_inputs, + .outputs = avfilter_vf_crop_outputs, }; -- cgit v1.2.3