diff options
author | Clément Bœsch <ubitux@gmail.com> | 2013-05-09 01:13:59 +0200 |
---|---|---|
committer | Clément Bœsch <ubitux@gmail.com> | 2013-05-12 13:07:47 +0200 |
commit | 0122300c861d2b8dd27a4c483d167f504dd74ff0 (patch) | |
tree | 25bf64b2bc14061bba544e58f827770564ee0482 /libavfilter/vf_hqdn3d.c | |
parent | 0652111833e20bf776ae93f153cfa9c33a8ad0f0 (diff) | |
download | ffmpeg-streaming-0122300c861d2b8dd27a4c483d167f504dd74ff0.zip ffmpeg-streaming-0122300c861d2b8dd27a4c483d167f504dd74ff0.tar.gz |
lavfi/hqdn3d: restore timeline feature.
Diffstat (limited to 'libavfilter/vf_hqdn3d.c')
-rw-r--r-- | libavfilter/vf_hqdn3d.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/libavfilter/vf_hqdn3d.c b/libavfilter/vf_hqdn3d.c index 8f39280..d8a8586 100644 --- a/libavfilter/vf_hqdn3d.c +++ b/libavfilter/vf_hqdn3d.c @@ -274,13 +274,14 @@ static int config_input(AVFilterLink *inlink) static int filter_frame(AVFilterLink *inlink, AVFrame *in) { - HQDN3DContext *hqdn3d = inlink->dst->priv; - AVFilterLink *outlink = inlink->dst->outputs[0]; + AVFilterContext *ctx = inlink->dst; + HQDN3DContext *hqdn3d = ctx->priv; + AVFilterLink *outlink = ctx->outputs[0]; AVFrame *out; int direct, c; - if (av_frame_is_writable(in)) { + if (av_frame_is_writable(in) && !ctx->is_disabled) { direct = 1; out = in; } else { @@ -304,6 +305,11 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) hqdn3d->coefs[c ? CHROMA_TMP : LUMA_TMP]); } + if (ctx->is_disabled) { + av_frame_free(&out); + return ff_filter_frame(outlink, in); + } + if (!direct) av_frame_free(&in); @@ -358,4 +364,5 @@ AVFilter avfilter_vf_hqdn3d = { .inputs = avfilter_vf_hqdn3d_inputs, .outputs = avfilter_vf_hqdn3d_outputs, + .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, }; |