summaryrefslogtreecommitdiff
path: root/libavfilter/avfilter.c
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2013-05-09 01:04:41 +0200
committerClément Bœsch <ubitux@gmail.com>2013-05-12 13:07:47 +0200
commit1776177b7f1ae67ad3b42d99464b141ee4082310 (patch)
tree1044d44ef5459e4706b639eea2923472420dcbd7 /libavfilter/avfilter.c
parent60f0e304312d0fe1d26f7344cb86dc4cdab52b15 (diff)
lavfi: replace passthrough_filter_frame with a flag.
With the introduction of AVFilterContext->is_disabled, we can simplify the custom passthrough mode in filters. This commit is technically a small compat break, but the timeline was introduced very recently. Doxy by Stefano Sabatini.
Diffstat (limited to 'libavfilter/avfilter.c')
-rw-r--r--libavfilter/avfilter.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 3f94dded2d..b61b7060a7 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -453,6 +453,9 @@ int avfilter_register(AVFilter *filter)
AVFilter **f = &first_filter;
int i;
+ /* the filter must select generic or internal exclusively */
+ av_assert0((filter->flags & AVFILTER_FLAG_SUPPORT_TIMELINE) != AVFILTER_FLAG_SUPPORT_TIMELINE);
+
for(i=0; filter->inputs && filter->inputs[i].name; i++) {
const AVFilterPad *input = &filter->inputs[i];
av_assert0( !input->filter_frame
@@ -995,9 +998,9 @@ static int ff_filter_frame_framed(AVFilterLink *link, AVFrame *frame)
dstctx->var_values[VAR_POS] = pos == -1 ? NAN : pos;
dstctx->is_disabled = !av_expr_eval(dstctx->enable, dstctx->var_values, NULL);
- if (dstctx->is_disabled)
- filter_frame = dst->passthrough_filter_frame ? dst->passthrough_filter_frame
- : default_filter_frame;
+ if (dstctx->is_disabled &&
+ (dstctx->filter->flags & AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC))
+ filter_frame = default_filter_frame;
}
ret = filter_frame(link, out);
link->frame_count++;