From f04a2ba30230d80201d7021780593625c5ba709e Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Thu, 21 Mar 2024 13:32:21 +0100 Subject: [PATCH] avcodec/dovi_rpu: fix off-by-one in loop Otherwise the last VDR would never get copied. --- libavcodec/dovi_rpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/dovi_rpu.c b/libavcodec/dovi_rpu.c index 6185fac230..31c64fb060 100644 --- a/libavcodec/dovi_rpu.c +++ b/libavcodec/dovi_rpu.c @@ -68,7 +68,7 @@ void ff_dovi_ctx_replace(DOVIContext *s, const DOVIContext *s0) s->mapping = s0->mapping; s->color = s0->color; s->dv_profile = s0->dv_profile; - for (int i = 0; i < DOVI_MAX_DM_ID; i++) + for (int i = 0; i <= DOVI_MAX_DM_ID; i++) ff_refstruct_replace(&s->vdr[i], s0->vdr[i]); }