mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-23 11:39:49 +00:00
lavfi/hqdn3d: restore timeline feature.
This commit is contained in:
parent
0652111833
commit
0122300c86
@ -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,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user