]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/vf_deinterlace_vaapi.c
avfilter: Constify all AVFilters
[ffmpeg] / libavfilter / vf_deinterlace_vaapi.c
index 2c147310c90de8c687705371f165101cffeac2f7..0e645f50f249cc980299451ea90239383703f496 100644 (file)
@@ -237,6 +237,10 @@ static int deint_vaapi_filter_frame(AVFilterLink *inlink, AVFrame *input_frame)
             goto fail;
         }
 
+        err = av_frame_copy_props(output_frame, input_frame);
+        if (err < 0)
+            goto fail;
+
         err = ff_vaapi_vpp_init_params(avctx, &params,
                                        input_frame, output_frame);
         if (err < 0)
@@ -284,10 +288,6 @@ static int deint_vaapi_filter_frame(AVFilterLink *inlink, AVFrame *input_frame)
         if (err < 0)
             goto fail;
 
-        err = av_frame_copy_props(output_frame, input_frame);
-        if (err < 0)
-            goto fail;
-
         if (ctx->field_rate == 2) {
             if (field == 0)
                 output_frame->pts = 2 * input_frame->pts;
@@ -383,7 +383,7 @@ static const AVFilterPad deint_vaapi_outputs[] = {
     { NULL }
 };
 
-AVFilter ff_vf_deinterlace_vaapi = {
+const AVFilter ff_vf_deinterlace_vaapi = {
     .name           = "deinterlace_vaapi",
     .description    = NULL_IF_CONFIG_SMALL("Deinterlacing of VAAPI surfaces"),
     .priv_size      = sizeof(DeintVAAPIContext),