aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/avfilter.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-11-28 14:46:46 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-11-28 16:43:34 +0100
commitf6dd145533eebdde189adafc791236b2e5419287 (patch)
tree2ca1367900623db55b0fb5b2e836435da5c41043 /libavfilter/avfilter.c
parentcd7febd33f20b42aac14cf9cb87efdf619b39b0a (diff)
downloadffmpeg-f6dd145533eebdde189adafc791236b2e5419287.tar.gz
avfilter: check that filter_frame and slice variants are not both used
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/avfilter.c')
-rw-r--r--libavfilter/avfilter.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index c7384db4b1..d1b6d05a38 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -409,6 +409,8 @@ AVFilter *avfilter_get_by_name(const char *name)
int avfilter_register(AVFilter *filter)
{
+ int i;
+
if (next_registered_avfilter_idx == MAX_REGISTERED_AVFILTERS_NB) {
av_log(NULL, AV_LOG_ERROR,
"Maximum number of registered filters %d reached, "
@@ -417,6 +419,12 @@ int avfilter_register(AVFilter *filter)
return AVERROR(ENOMEM);
}
+ for(i=0; filter->inputs && filter->inputs[i].name; i++) {
+ const AVFilterPad *input = &filter->inputs[i];
+ av_assert0( !input->filter_frame
+ || (!input->start_frame && !input->end_frame && !input->draw_slice));
+ }
+
registered_avfilters[next_registered_avfilter_idx++] = filter;
return 0;
}