<!DOCTYPE html><html><head><title></title><style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div><br></div><div>On Tue, Apr 30, 2019, at 16:20, Rémi Denis-Courmont wrote:<br></div><blockquote type="cite" id="qt"><div>Hi,<br></div><div><br></div><div>Uh, isn't the macro called ARRAY_SIZE? I'm surprised this even compiles (well, I have not tried).<br></div></blockquote><div><br></div><div>There are few ARRAYSIZE in win32 only code.<br></div><div><br></div><div>/usr/share/mingw-w64/include/winnt.h:<br></div><div>#define RTL_NUMBER_OF_V1(A) (sizeof(A)/sizeof((A)[0]))<br></div><div>#define RTL_NUMBER_OF_V2(A) RTL_NUMBER_OF_V1(A)<br></div><div>#define ARRAYSIZE(A) RTL_NUMBER_OF_V2(A)<br></div><div><br></div><div>I think it's still preferable to use VLC MACRO (ARRAY_SIZE).<br></div><div><br></div><blockquote type="cite" id="qt"><div class="qt-gmail_quote"><div>Le 30 avril 2019 11:03:14 GMT+02:00, Steve Lhomme <robux4@ycbcr.xyz> a écrit :<br></div><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:0pt;margin-left:0.8ex;border-left-color:rgb(204, 204, 204);border-left-style:solid;border-left-width:1px;padding-left:1ex;" class="qt-gmail_quote"><pre class="qt-k9mail"><div>And the table is using PICTURE_PLANE_MAX not VOUT_MAX_PLANES.<hr> src/misc/picture.c | 2 +-<br></div><div> 1 file changed, 1 insertion(+), 1 deletion(-)<br></div><div><br></div><div>diff --git a/src/misc/picture.c b/src/misc/picture.c<br></div><div>index 46a2a069de..7ca4c6ac56 100644<br></div><div>--- a/src/misc/picture.c<br></div><div>+++ b/src/misc/picture.c<br></div><div>@@ -114,7 +114,7 @@ int picture_Setup( picture_t *p_picture, const video_format_t *restrict fmt )<br></div><div> <br></div><div>     /* Store default values */<br></div><div>     p_picture->i_planes = 0;<br></div><div>-    for( unsigned i = 0; i < VOUT_MAX_PLANES; i++ )<br></div><div>+    for( unsigned i = 0; i < ARRAYSIZE(p_picture->p); i++ )<br></div><div>     {<br></div><div>         plane_t *p = &p_picture->p[i];<br></div><div>         p->p_pixels = NULL;<br></div></pre></blockquote></div><div><br></div><div>-- <br></div><div>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté. <br></div><div>_______________________________________________<br></div><div>vlc-devel mailing list<br></div><div>To unsubscribe or modify your subscription options:<br></div><div>https://mailman.videolan.org/listinfo/vlc-devel<br></div></blockquote><div><br></div></body></html>