From 7ca7e13b6d3c7a593a5cb0fe2eab76bffa947b83 Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4@ycbcr.xyz>
Date: Tue, 23 Apr 2019 08:31:34 +0200
Subject: [PATCH] picture: init the plane table using the same size

And the table is using PICTURE_PLANE_MAX not VOUT_MAX_PLANES.
---
 src/misc/picture.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/misc/picture.c b/src/misc/picture.c
index 46a2a069de18..cd463d40346f 100644
--- a/src/misc/picture.c
+++ b/src/misc/picture.c
@@ -114,7 +114,7 @@ int picture_Setup( picture_t *p_picture, const video_format_t *restrict fmt )
 
     /* Store default values */
     p_picture->i_planes = 0;
-    for( unsigned i = 0; i < VOUT_MAX_PLANES; i++ )
+    for( unsigned i = 0; i < ARRAY_SIZE(p_picture->p); i++ )
     {
         plane_t *p = &p_picture->p[i];
         p->p_pixels = NULL;
-- 
GitLab