[FFmpeg-cvslog] lavfi: replace empty input/output lists with null pointers
Mans Rullgard
git at videolan.org
Tue Sep 18 14:52:48 CEST 2012
ffmpeg | branch: master | Mans Rullgard <mans at mansr.com> | Sun Sep 16 12:58:49 2012 +0100| [1fce361d70296cb9f8828f58bf26cd1ce4e8a47a] | committer: Mans Rullgard
lavfi: replace empty input/output lists with null pointers
Signed-off-by: Mans Rullgard <mans at mansr.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1fce361d70296cb9f8828f58bf26cd1ce4e8a47a
---
libavfilter/af_amix.c | 2 +-
libavfilter/af_channelsplit.c | 2 +-
libavfilter/af_join.c | 2 +-
libavfilter/asink_anullsink.c | 2 +-
libavfilter/asrc_anullsrc.c | 2 +-
libavfilter/avfilter.c | 3 +++
libavfilter/buffersink.c | 4 ++--
libavfilter/buffersrc.c | 4 ++--
libavfilter/split.c | 4 ++--
libavfilter/vf_frei0r.c | 2 +-
libavfilter/vsink_nullsink.c | 2 +-
libavfilter/vsrc_color.c | 2 +-
libavfilter/vsrc_movie.c | 2 +-
libavfilter/vsrc_nullsrc.c | 2 +-
libavfilter/vsrc_testsrc.c | 4 ++--
15 files changed, 21 insertions(+), 18 deletions(-)
diff --git a/libavfilter/af_amix.c b/libavfilter/af_amix.c
index a2eb911..202d675 100644
--- a/libavfilter/af_amix.c
+++ b/libavfilter/af_amix.c
@@ -556,7 +556,7 @@ AVFilter avfilter_af_amix = {
.uninit = uninit,
.query_formats = query_formats,
- .inputs = (const AVFilterPad[]) {{ .name = NULL}},
+ .inputs = NULL,
.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.config_props = config_output,
diff --git a/libavfilter/af_channelsplit.c b/libavfilter/af_channelsplit.c
index 68615aa..fc044d0 100644
--- a/libavfilter/af_channelsplit.c
+++ b/libavfilter/af_channelsplit.c
@@ -148,5 +148,5 @@ AVFilter avfilter_af_channelsplit = {
.type = AVMEDIA_TYPE_AUDIO,
.filter_samples = filter_samples, },
{ NULL }},
- .outputs = (const AVFilterPad[]){{ NULL }},
+ .outputs = NULL,
};
diff --git a/libavfilter/af_join.c b/libavfilter/af_join.c
index bf939fe..26f631d 100644
--- a/libavfilter/af_join.c
+++ b/libavfilter/af_join.c
@@ -495,7 +495,7 @@ AVFilter avfilter_af_join = {
.uninit = join_uninit,
.query_formats = join_query_formats,
- .inputs = (const AVFilterPad[]){{ NULL }},
+ .inputs = NULL,
.outputs = (const AVFilterPad[]){{ .name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.config_props = join_config_output,
diff --git a/libavfilter/asink_anullsink.c b/libavfilter/asink_anullsink.c
index cada5c5..386323f 100644
--- a/libavfilter/asink_anullsink.c
+++ b/libavfilter/asink_anullsink.c
@@ -39,5 +39,5 @@ AVFilter avfilter_asink_anullsink = {
},
{ .name = NULL},
},
- .outputs = (const AVFilterPad[]) {{ .name = NULL }},
+ .outputs = NULL,
};
diff --git a/libavfilter/asrc_anullsrc.c b/libavfilter/asrc_anullsrc.c
index 6627c33..62bd3de 100644
--- a/libavfilter/asrc_anullsrc.c
+++ b/libavfilter/asrc_anullsrc.c
@@ -91,7 +91,7 @@ AVFilter avfilter_asrc_anullsrc = {
.init = init,
.priv_size = sizeof(ANullContext),
- .inputs = (const AVFilterPad[]) {{ .name = NULL}},
+ .inputs = NULL,
.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_AUDIO,
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 77b3633..29afc86 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -302,6 +302,9 @@ static int pad_count(const AVFilterPad *pads)
{
int count;
+ if (!pads)
+ return 0;
+
for(count = 0; pads->name; count ++) pads ++;
return count;
}
diff --git a/libavfilter/buffersink.c b/libavfilter/buffersink.c
index d62b081..ca732fc 100644
--- a/libavfilter/buffersink.c
+++ b/libavfilter/buffersink.c
@@ -152,7 +152,7 @@ AVFilter avfilter_vsink_buffer = {
.min_perms = AV_PERM_READ,
.needs_fifo = 1 },
{ .name = NULL }},
- .outputs = (const AVFilterPad[]) {{ .name = NULL }},
+ .outputs = NULL,
};
AVFilter avfilter_asink_abuffer = {
@@ -167,5 +167,5 @@ AVFilter avfilter_asink_abuffer = {
.min_perms = AV_PERM_READ,
.needs_fifo = 1 },
{ .name = NULL }},
- .outputs = (const AVFilterPad[]) {{ .name = NULL }},
+ .outputs = NULL,
};
diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c
index 8e344cb..e91d2e4 100644
--- a/libavfilter/buffersrc.c
+++ b/libavfilter/buffersrc.c
@@ -364,7 +364,7 @@ AVFilter avfilter_vsrc_buffer = {
.init = init_video,
.uninit = uninit,
- .inputs = (const AVFilterPad[]) {{ .name = NULL }},
+ .inputs = NULL,
.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.request_frame = request_frame,
@@ -382,7 +382,7 @@ AVFilter avfilter_asrc_abuffer = {
.init = init_audio,
.uninit = uninit,
- .inputs = (const AVFilterPad[]) {{ .name = NULL }},
+ .inputs = NULL,
.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.request_frame = request_frame,
diff --git a/libavfilter/split.c b/libavfilter/split.c
index 8822409..e5ff0e5 100644
--- a/libavfilter/split.c
+++ b/libavfilter/split.c
@@ -124,7 +124,7 @@ AVFilter avfilter_vf_split = {
.draw_slice = draw_slice,
.end_frame = end_frame, },
{ .name = NULL}},
- .outputs = (const AVFilterPad[]) {{ .name = NULL}},
+ .outputs = NULL,
};
static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *samplesref)
@@ -160,5 +160,5 @@ AVFilter avfilter_af_asplit = {
.get_audio_buffer = ff_null_get_audio_buffer,
.filter_samples = filter_samples },
{ .name = NULL }},
- .outputs = (const AVFilterPad[]) {{ .name = NULL }},
+ .outputs = NULL,
};
diff --git a/libavfilter/vf_frei0r.c b/libavfilter/vf_frei0r.c
index 2f4e47c..f29224e 100644
--- a/libavfilter/vf_frei0r.c
+++ b/libavfilter/vf_frei0r.c
@@ -488,7 +488,7 @@ AVFilter avfilter_vsrc_frei0r_src = {
.query_formats = query_formats,
- .inputs = (const AVFilterPad[]) {{ .name = NULL}},
+ .inputs = NULL,
.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
diff --git a/libavfilter/vsink_nullsink.c b/libavfilter/vsink_nullsink.c
index 27d85a0..7373020 100644
--- a/libavfilter/vsink_nullsink.c
+++ b/libavfilter/vsink_nullsink.c
@@ -45,5 +45,5 @@ AVFilter avfilter_vsink_nullsink = {
},
{ .name = NULL},
},
- .outputs = (const AVFilterPad[]) {{ .name = NULL }},
+ .outputs = NULL,
};
diff --git a/libavfilter/vsrc_color.c b/libavfilter/vsrc_color.c
index d7a26a7..964213f 100644
--- a/libavfilter/vsrc_color.c
+++ b/libavfilter/vsrc_color.c
@@ -192,7 +192,7 @@ AVFilter avfilter_vsrc_color = {
.query_formats = query_formats,
- .inputs = (const AVFilterPad[]) {{ .name = NULL}},
+ .inputs = NULL,
.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
diff --git a/libavfilter/vsrc_movie.c b/libavfilter/vsrc_movie.c
index 09871fe..aeab102 100644
--- a/libavfilter/vsrc_movie.c
+++ b/libavfilter/vsrc_movie.c
@@ -317,7 +317,7 @@ AVFilter avfilter_vsrc_movie = {
.uninit = uninit,
.query_formats = query_formats,
- .inputs = (const AVFilterPad[]) {{ .name = NULL }},
+ .inputs = NULL,
.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.request_frame = request_frame,
diff --git a/libavfilter/vsrc_nullsrc.c b/libavfilter/vsrc_nullsrc.c
index 888dbcc..49200c2 100644
--- a/libavfilter/vsrc_nullsrc.c
+++ b/libavfilter/vsrc_nullsrc.c
@@ -121,7 +121,7 @@ AVFilter avfilter_vsrc_nullsrc = {
.init = init,
.priv_size = sizeof(NullContext),
- .inputs = (const AVFilterPad[]) {{ .name = NULL}},
+ .inputs = NULL,
.outputs = (const AVFilterPad[]) {
{
diff --git a/libavfilter/vsrc_testsrc.c b/libavfilter/vsrc_testsrc.c
index 709a6a2..bbfd39a 100644
--- a/libavfilter/vsrc_testsrc.c
+++ b/libavfilter/vsrc_testsrc.c
@@ -367,7 +367,7 @@ AVFilter avfilter_vsrc_testsrc = {
.query_formats = test_query_formats,
- .inputs = (const AVFilterPad[]) {{ .name = NULL}},
+ .inputs = NULL,
.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
@@ -494,7 +494,7 @@ AVFilter avfilter_vsrc_rgbtestsrc = {
.query_formats = rgbtest_query_formats,
- .inputs = (const AVFilterPad[]) {{ .name = NULL}},
+ .inputs = NULL,
.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
More information about the ffmpeg-cvslog
mailing list