Commit f6dd1455 authored by Michael Niedermayer's avatar Michael Niedermayer

avfilter: check that filter_frame and slice variants are not both used

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent cd7febd3
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment