]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/vf_procamp_vaapi.c
avfilter: Constify all AVFilters
[ffmpeg] / libavfilter / vf_procamp_vaapi.c
index 03da36066920818ba32deab53dddfb8465212ee5..9d0c813e6df5779d71a3dbd01fff670de85386f5 100644 (file)
@@ -148,6 +148,10 @@ static int procamp_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)
@@ -160,9 +164,6 @@ static int procamp_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;
     av_frame_free(&input_frame);
 
     av_log(avctx, AV_LOG_DEBUG, "Filter output: %s, %ux%u (%"PRId64").\n",
@@ -232,7 +233,7 @@ static const AVFilterPad procamp_vaapi_outputs[] = {
     { NULL }
 };
 
-AVFilter ff_vf_procamp_vaapi = {
+const AVFilter ff_vf_procamp_vaapi = {
     .name          = "procamp_vaapi",
     .description   = NULL_IF_CONFIG_SMALL("ProcAmp (color balance) adjustments for hue, saturation, brightness, contrast"),
     .priv_size     = sizeof(ProcampVAAPIContext),