diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-11-28 14:46:46 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-11-28 16:43:34 +0100 |
commit | f6dd145533eebdde189adafc791236b2e5419287 (patch) | |
tree | 2ca1367900623db55b0fb5b2e836435da5c41043 /libavfilter/avfilter.c | |
parent | cd7febd33f20b42aac14cf9cb87efdf619b39b0a (diff) | |
download | ffmpeg-streaming-f6dd145533eebdde189adafc791236b2e5419287.zip ffmpeg-streaming-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.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index c7384db..d1b6d05 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; } |