summaryrefslogtreecommitdiff
path: root/libavfilter/avfilter.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-05-08 21:58:40 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-05-08 23:55:06 +0200
commitdf9f9caba58aeac461abb1232b46adbd93df7ed2 (patch)
treec498feb5829cdd3c82be70d926feb5f5741a99bf /libavfilter/avfilter.c
parentc4a5499d259b12748a41ec056f3594eb7a00efbf (diff)
avfilter: Make enabled/disabled state available as a field of the AVFilterContext
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/avfilter.c')
-rw-r--r--libavfilter/avfilter.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 06d92b2df5..2dffccab89 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -993,7 +993,9 @@ static int ff_filter_frame_framed(AVFilterLink *link, AVFrame *frame)
dstctx->var_values[VAR_N] = link->frame_count;
dstctx->var_values[VAR_T] = pts == AV_NOPTS_VALUE ? NAN : pts * av_q2d(link->time_base);
dstctx->var_values[VAR_POS] = pos == -1 ? NAN : pos;
- if (!av_expr_eval(dstctx->enable, dstctx->var_values, NULL))
+
+ 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;
}