diff --git a/libavcodec/g2meet.c b/libavcodec/g2meet.c index ccccf21834..1eae1a49b5 100644 --- a/libavcodec/g2meet.c +++ b/libavcodec/g2meet.c @@ -443,8 +443,8 @@ static int g2m_init_buffers(G2MContext *c) int aligned_height; if (!c->framebuf || c->old_width < c->width || c->old_height < c->height) { - c->framebuf_stride = FFALIGN(c->width * 3, 16); - aligned_height = FFALIGN(c->height, 16); + c->framebuf_stride = FFALIGN(c->width + 15, 16) * 3; + aligned_height = c->height + 15; av_free(c->framebuf); c->framebuf = av_mallocz(c->framebuf_stride * aligned_height); if (!c->framebuf)