diff options
Diffstat (limited to 'libavfilter/vf_yadif_cuda.c')
-rw-r--r-- | libavfilter/vf_yadif_cuda.c | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/libavfilter/vf_yadif_cuda.c b/libavfilter/vf_yadif_cuda.c index d777757e65..17389f092f 100644 --- a/libavfilter/vf_yadif_cuda.c +++ b/libavfilter/vf_yadif_cuda.c @@ -200,10 +200,7 @@ static av_cold void deint_cuda_uninit(AVFilterContext *ctx) CHECK_CU(cu->cuCtxPopCurrent(&dummy)); } - av_frame_free(&y->prev); - av_frame_free(&y->cur); - av_frame_free(&y->next); - ff_ccfifo_uninit(&y->cc_fifo); + ff_yadif_uninit(ctx); av_buffer_unref(&s->device_ref); s->hwctx = NULL; @@ -281,27 +278,9 @@ static int config_output(AVFilterLink *link) goto exit; } - link->time_base = av_mul_q(ctx->inputs[0]->time_base, (AVRational){1, 2}); - link->w = ctx->inputs[0]->w; - link->h = ctx->inputs[0]->h; - - if(y->mode & 1) - link->frame_rate = av_mul_q(ctx->inputs[0]->frame_rate, - (AVRational){2, 1}); - else - link->frame_rate = ctx->inputs[0]->frame_rate; - - ret = ff_ccfifo_init(&y->cc_fifo, link->frame_rate, ctx); - if (ret < 0) { - av_log(ctx, AV_LOG_ERROR, "Failure to setup CC FIFO queue\n"); - goto exit; - } - - if (link->w < 3 || link->h < 3) { - av_log(ctx, AV_LOG_ERROR, "Video of less than 3 columns or lines is not supported\n"); - ret = AVERROR(EINVAL); + ret = ff_yadif_config_output_common(link); + if (ret < 0) goto exit; - } y->csp = av_pix_fmt_desc_get(output_frames->sw_format); y->filter = filter; |