aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.dev>2024-03-21 13:32:21 +0100
committerNiklas Haas <git@haasn.dev>2024-03-22 14:05:30 +0100
commitf04a2ba30230d80201d7021780593625c5ba709e (patch)
tree9f2cdfa1f2502218e35effe7f64cde927a788eb9
parentd5648a806fda04eeb76e4c8ec9685e8ce19ecc44 (diff)
downloadffmpeg-f04a2ba30230d80201d7021780593625c5ba709e.tar.gz
avcodec/dovi_rpu: fix off-by-one in loop
Otherwise the last VDR would never get copied.
-rw-r--r--libavcodec/dovi_rpu.c2
1 files changed, 1 insertions, 1 deletions
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]);
}