History

avfilter/vf_nnedi: set frame_rate only when needed

Paul B Mahol committed 4 years ago

Commit 6018fa81 parent 55e0b041 file · +4 −2Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/vf_nnedi.c+4−2
@@ -166,13 +166,15 @@ AVFILTER_DEFINE_CLASS(nnedi); · 165 unmodified lines
166static int config_output(AVFilterLink *outlink)166static int config_output(AVFilterLink *outlink)
167{167{
168 AVFilterContext *ctx = outlink->src;168 AVFilterContext *ctx = outlink->src;
169 const NNEDIContext *const s = ctx->priv;
169 170
170 outlink->time_base = av_mul_q(ctx->inputs[0]->time_base, (AVRational){1, 2});171 outlink->time_base = av_mul_q(ctx->inputs[0]->time_base, (AVRational){1, 2});
171 outlink->w = ctx->inputs[0]->w;172 outlink->w = ctx->inputs[0]->w;
172 outlink->h = ctx->inputs[0]->h;173 outlink->h = ctx->inputs[0]->h;
173 174
174 outlink->frame_rate = av_mul_q(ctx->inputs[0]->frame_rate,175 if (s->field == -2 || s->field > 1)
175 (AVRational){2, 1});176 outlink->frame_rate = av_mul_q(ctx->inputs[0]->frame_rate,
177 (AVRational){2, 1});
176 178
177 return 0;179 return 0;
178}180}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t