[FFmpeg-cvslog] lavfi/hqdn3d: restore timeline feature.
Clément Bœsch
git at videolan.org
Sun May 12 13:13:20 CEST 2013
ffmpeg | branch: master | Clément Bœsch <ubitux at gmail.com> | Thu May 9 01:13:59 2013 +0200| [0122300c861d2b8dd27a4c483d167f504dd74ff0] | committer: Clément Bœsch
lavfi/hqdn3d: restore timeline feature.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0122300c861d2b8dd27a4c483d167f504dd74ff0
---
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 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,
};
More information about the ffmpeg-cvslog
mailing list