diff options
author | Mans Rullgard <mans@mansr.com> | 2012-07-24 14:14:01 +0100 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2012-10-10 22:26:12 +0100 |
commit | 568c70e79ee267426c15ef4603c69703f6a5884a (patch) | |
tree | f5898fd564b41f8b200cdddc71c2dc5a5fd90642 /libavfilter/split.c | |
parent | b404c6605627dbbc07d680803e1a3f70cb4704a0 (diff) | |
download | ffmpeg-568c70e79ee267426c15ef4603c69703f6a5884a.tar.gz |
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 <mans@mansr.com>
Diffstat (limited to 'libavfilter/split.c')
-rw-r--r-- | libavfilter/split.c | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/libavfilter/split.c b/libavfilter/split.c index e5ff0e56dc..01bb4489f0 100644 --- a/libavfilter/split.c +++ b/libavfilter/split.c @@ -110,6 +110,18 @@ static int end_frame(AVFilterLink *inlink) return ret; } +static const AVFilterPad avfilter_vf_split_inputs[] = { + { + .name = "default", + .type = AVMEDIA_TYPE_VIDEO, + .get_video_buffer = ff_null_get_video_buffer, + .start_frame = start_frame, + .draw_slice = draw_slice, + .end_frame = end_frame, + }, + { NULL } +}; + AVFilter avfilter_vf_split = { .name = "split", .description = NULL_IF_CONFIG_SMALL("Pass on the input to two outputs."), @@ -117,13 +129,7 @@ AVFilter avfilter_vf_split = { .init = split_init, .uninit = split_uninit, - .inputs = (const AVFilterPad[]) {{ .name = "default", - .type = AVMEDIA_TYPE_VIDEO, - .get_video_buffer= ff_null_get_video_buffer, - .start_frame = start_frame, - .draw_slice = draw_slice, - .end_frame = end_frame, }, - { .name = NULL}}, + .inputs = avfilter_vf_split_inputs, .outputs = NULL, }; @@ -148,6 +154,16 @@ static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *samplesref) return ret; } +static const AVFilterPad avfilter_af_asplit_inputs[] = { + { + .name = "default", + .type = AVMEDIA_TYPE_AUDIO, + .get_audio_buffer = ff_null_get_audio_buffer, + .filter_samples = filter_samples + }, + { NULL } +}; + AVFilter avfilter_af_asplit = { .name = "asplit", .description = NULL_IF_CONFIG_SMALL("Pass on the audio input to N audio outputs."), @@ -155,10 +171,6 @@ AVFilter avfilter_af_asplit = { .init = split_init, .uninit = split_uninit, - .inputs = (const AVFilterPad[]) {{ .name = "default", - .type = AVMEDIA_TYPE_AUDIO, - .get_audio_buffer = ff_null_get_audio_buffer, - .filter_samples = filter_samples }, - { .name = NULL }}, + .inputs = avfilter_af_asplit_inputs, .outputs = NULL, }; |