[vlc-devel] [PATCH 2/2] evas: use and check the plane alignment

Steve Lhomme robux4 at videolabs.io
Fri Dec 15 13:11:44 CET 2017


---
 modules/video_output/evas.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/video_output/evas.c b/modules/video_output/evas.c
index 36afcfd3e3..e71942f7c8 100644
--- a/modules/video_output/evas.c
+++ b/modules/video_output/evas.c
@@ -632,7 +632,10 @@ PoolLockPicture(picture_t *p_pic)
 
     p_picsys->p_buffer = p_buffer;
     for( unsigned int i = 0; i < sys->i_nb_planes; ++i )
+    {
         p_pic->p[i].p_pixels = p_buffer->p[i];
+        assert(!(((uintptr_t)p_pic->p[i].p_pixels) % VLC_PLANE_ALIGNMENT));
+    }
     return 0;
 }
 
@@ -996,7 +999,7 @@ EvasImageBuffersAlloc( vout_display_t *vd, video_format_t *p_fmt )
     {
         struct buffer *p_buffer = &sys->p_buffers[i];
 
-        p_buffer->p[0] = aligned_alloc( 16, i_bytes );
+        p_buffer->p[0] = aligned_alloc( VLC_PLANE_ALIGNMENT, i_bytes );
 
         if( !p_buffer->p[0] )
         {
-- 
2.14.2



More information about the vlc-devel mailing list