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

Steve Lhomme git at videolan.org
Tue May 7 12:01:04 CEST 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Apr 23 08:31:34 2019 +0200| [7ca7e13b6d3c7a593a5cb0fe2eab76bffa947b83] | committer: Steve Lhomme

picture: init the plane table using the same size

And the table is using PICTURE_PLANE_MAX not VOUT_MAX_PLANES.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7ca7e13b6d3c7a593a5cb0fe2eab76bffa947b83
---

 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..cd463d4034 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;



More information about the vlc-commits mailing list