From dd9c0e2029a2872ad59034449e3933b34853fa28 Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu <randrianasulu@gmail.com>
Date: Mon, 11 Apr 2022 02:24:28 +0300
Subject: [PATCH 2/2] align vframe rows to 16 byte boundary (from Einar)

---
 cinelerra-5.1/guicast/vframe.C | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cinelerra-5.1/guicast/vframe.C b/cinelerra-5.1/guicast/vframe.C
index 8e90cca1..f2283285 100644
--- a/cinelerra-5.1/guicast/vframe.C
+++ b/cinelerra-5.1/guicast/vframe.C
@@ -497,7 +497,7 @@ int VFrame::allocate_data(unsigned char *data, int shmid,
 //	}
 
 	this->bytes_per_line = bytes_per_line >= 0 ?
-		bytes_per_line : this->bytes_per_pixel * w;
+		bytes_per_line : (this->bytes_per_pixel * w + 15) & ~15;
 
 // Allocate data + padding for MMX
 	if( data ) {
-- 
2.35.1

