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