diff options
author | Niklas Haas <git@haasn.dev> | 2024-04-26 12:56:35 +0200 |
---|---|---|
committer | Niklas Haas <git@haasn.dev> | 2024-12-23 14:23:13 +0100 |
commit | f22965b8823c92b16c645e7ef5a0ef95b81c7821 (patch) | |
tree | 406392e41e5405e515d3a5b29a5dd9d8c256426b /libavfilter/vf_scale_vaapi.c | |
parent | b88944a8aa599be0f16603380e7bc51402d3caf8 (diff) | |
download | ffmpeg-f22965b8823c92b16c645e7ef5a0ef95b81c7821.tar.gz |
avfilter/vf_scale*: strip metadata on size change
Diffstat (limited to 'libavfilter/vf_scale_vaapi.c')
-rw-r--r-- | libavfilter/vf_scale_vaapi.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavfilter/vf_scale_vaapi.c b/libavfilter/vf_scale_vaapi.c index 65db05c23d..78406bbcf3 100644 --- a/libavfilter/vf_scale_vaapi.c +++ b/libavfilter/vf_scale_vaapi.c @@ -137,6 +137,12 @@ static int scale_vaapi_filter_frame(AVFilterLink *inlink, AVFrame *input_frame) if (err < 0) goto fail; + if (output_frame->width != input_frame->width || output_frame->height != input_frame->height) { + av_frame_side_data_remove_by_props(&output_frame->side_data, + &output_frame->nb_side_data, + AV_SIDE_DATA_PROP_SIZE_DEPENDENT); + } + if (ctx->colour_primaries != AVCOL_PRI_UNSPECIFIED) output_frame->color_primaries = ctx->colour_primaries; if (ctx->colour_transfer != AVCOL_TRC_UNSPECIFIED) |