[FFmpeg-devel] [PATCH 3/5] lavfi/hqdn3d: restore timeline feature.
Clément Bœsch
ubitux at gmail.com
Thu May 9 01:53:25 CEST 2013
---
libavfilter/vf_hqdn3d.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/libavfilter/vf_hqdn3d.c b/libavfilter/vf_hqdn3d.c
index c0a14df..5a0dd33 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,
};
--
1.8.2.2
More information about the ffmpeg-devel
mailing list