summaryrefslogtreecommitdiff
path: root/libavfilter/fifo.c
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2012-07-24 14:14:01 +0100
committerMans Rullgard <mans@mansr.com>2012-10-10 22:26:12 +0100
commit568c70e79ee267426c15ef4603c69703f6a5884a (patch)
treef5898fd564b41f8b200cdddc71c2dc5a5fd90642 /libavfilter/fifo.c
parentb404c6605627dbbc07d680803e1a3f70cb4704a0 (diff)
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/fifo.c')
-rw-r--r--libavfilter/fifo.c68
1 files changed, 46 insertions, 22 deletions
diff --git a/libavfilter/fifo.c b/libavfilter/fifo.c
index bf78bb6aef..b13be68015 100644
--- a/libavfilter/fifo.c
+++ b/libavfilter/fifo.c
@@ -267,6 +267,28 @@ static int request_frame(AVFilterLink *outlink)
return ret;
}
+static const AVFilterPad avfilter_vf_fifo_inputs[] = {
+ {
+ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .get_video_buffer = ff_null_get_video_buffer,
+ .start_frame = add_to_queue,
+ .draw_slice = draw_slice,
+ .end_frame = end_frame,
+ .rej_perms = AV_PERM_REUSE2,
+ },
+ { NULL }
+};
+
+static const AVFilterPad avfilter_vf_fifo_outputs[] = {
+ {
+ .name = "default",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .request_frame = request_frame,
+ },
+ { NULL }
+};
+
AVFilter avfilter_vf_fifo = {
.name = "fifo",
.description = NULL_IF_CONFIG_SMALL("Buffer input images and send them when they are requested."),
@@ -276,18 +298,28 @@ AVFilter avfilter_vf_fifo = {
.priv_size = sizeof(FifoContext),
- .inputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .get_video_buffer= ff_null_get_video_buffer,
- .start_frame = add_to_queue,
- .draw_slice = draw_slice,
- .end_frame = end_frame,
- .rej_perms = AV_PERM_REUSE2, },
- { .name = NULL}},
- .outputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_VIDEO,
- .request_frame = request_frame, },
- { .name = NULL}},
+ .inputs = avfilter_vf_fifo_inputs,
+ .outputs = avfilter_vf_fifo_outputs,
+};
+
+static const AVFilterPad avfilter_af_afifo_inputs[] = {
+ {
+ .name = "default",
+ .type = AVMEDIA_TYPE_AUDIO,
+ .get_audio_buffer = ff_null_get_audio_buffer,
+ .filter_samples = add_to_queue,
+ .rej_perms = AV_PERM_REUSE2,
+ },
+ { NULL }
+};
+
+static const AVFilterPad avfilter_af_afifo_outputs[] = {
+ {
+ .name = "default",
+ .type = AVMEDIA_TYPE_AUDIO,
+ .request_frame = request_frame,
+ },
+ { NULL }
};
AVFilter avfilter_af_afifo = {
@@ -299,14 +331,6 @@ AVFilter avfilter_af_afifo = {
.priv_size = sizeof(FifoContext),
- .inputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_AUDIO,
- .get_audio_buffer = ff_null_get_audio_buffer,
- .filter_samples = add_to_queue,
- .rej_perms = AV_PERM_REUSE2, },
- { .name = NULL}},
- .outputs = (const AVFilterPad[]) {{ .name = "default",
- .type = AVMEDIA_TYPE_AUDIO,
- .request_frame = request_frame, },
- { .name = NULL}},
+ .inputs = avfilter_af_afifo_inputs,
+ .outputs = avfilter_af_afifo_outputs,
};