From 494e0319af8505385cac29a3a9c4e488599371fd Mon Sep 17 00:00:00 2001 From: Francois Cartegnie <fcvlcdev@free.fr> Date: Thu, 15 Nov 2018 12:13:48 +0100 Subject: [PATCH] access: bluray: only copy visible extents reverts partially 190ae0e0f63f5bd558c634b2467218189a9357c6 --- modules/access/bluray.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/access/bluray.c b/modules/access/bluray.c index 946f27021483..36a22a7dffbe 100644 --- a/modules/access/bluray.c +++ b/modules/access/bluray.c @@ -1948,10 +1948,17 @@ static void blurayDrawArgbOverlay(demux_t *p_demux, const BD_ARGB_OVERLAY* const } /* Now we can update the region */ + const uint32_t *src0 = ov->argb; uint8_t *dst0 = p_reg->p_picture->p[0].p_pixels + p_reg->p_picture->p[0].i_pitch * ov->y + ov->x * 4; - memcpy(dst0, ov->argb, (ov->stride * ov->h - ov->x)*4); + + for (int y = 0; y < ov->h; y++) + { + memcpy(dst0, src0, ov->w * 4); + src0 += ov->stride; + dst0 += p_reg->p_picture->p[0].i_pitch; + } vlc_mutex_unlock(&bdov->lock); /* -- GitLab