Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -166,13 +166,15 @@ AVFILTER_DEFINE_CLASS(nnedi); · 165 unmodified lines | |||
| 166 | static int config_output(AVFilterLink *outlink) | 166 | static 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 | } |