@@ -783,7 +783,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(link->format);
const AVPixFmtDescriptor *odesc = av_pix_fmt_desc_get(outlink->format);
char buf[32];
- int ret = 0;
+ int ret = 0, changed = 0;
AVFrame *out = NULL;
ThreadData td;
@@ -880,6 +880,12 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
(int64_t)in->sample_aspect_ratio.den * outlink->w * link->h,
INT_MAX);
+ if (out->width != in->width || out->height != in->height)
+ changed |= AV_FRAME_CHANGED_SIZE;
+ if (out->color_trc != in->color_trc || out->color_primaries != in->color_primaries)
+ changed |= AV_FRAME_CHANGED_COLOR_VOLUME;
+ av_frame_remove_side_data_changed(out, changed);
+
td.in = in;
td.out = out;
td.desc = desc;
From: Niklas Haas <git@haasn.dev> Required for both size chnages and color volume changes (as a result of changing primaries/transfer). --- libavfilter/vf_zscale.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)