[vlc-devel] [PATCH] picture: init the plane table using the same size

Steve Lhomme robux4 at ycbcr.xyz
Tue Apr 30 11:03:14 CEST 2019


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 46a2a069de..7ca4c6ac56 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 < ARRAYSIZE(p_picture->p); i++ )
     {
         plane_t *p = &p_picture->p[i];
         p->p_pixels = NULL;
-- 
2.17.1



More information about the vlc-devel mailing list