<html><head></head><body>Series LGTM<br><br><div class="gmail_quote">Le 22 janvier 2020 13:07:24 GMT+02:00, Steve Lhomme <robux4@ycbcr.xyz> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">Just keep picture_pool_New() that does exactly the same thing.<hr> src/misc/picture_pool.c | 34 +++++++---------------------------<br> 1 file changed, 7 insertions(+), 27 deletions(-)<br><br>diff --git a/src/misc/picture_pool.c b/src/misc/picture_pool.c<br>index 9181597a477..0eb53516adf 100644<br>--- a/src/misc/picture_pool.c<br>+++ b/src/misc/picture_pool.c<br>@@ -96,22 +96,13 @@ static picture_t *picture_pool_ClonePicture(picture_pool_t *pool,<br>                                  (void*)sys);<br> }<br> <br>-/**<br>- * Picture pool configuration<br>- */<br>-typedef struct {<br>-    unsigned  picture_count;<br>-    picture_t *const *picture;<br>-} picture_pool_configuration_t;<br>-<br>-static<br>-picture_pool_t *picture_pool_NewExtended(const picture_pool_configuration_t *cfg)<br>+picture_pool_t *picture_pool_New(unsigned count, picture_t *const *tab)<br> {<br>-    if (unlikely(cfg->picture_count > POOL_MAX))<br>+    if (unlikely(count > POOL_MAX))<br>         return NULL;<br> <br>     picture_pool_t *pool;<br>-    size_t size = sizeof (*pool) + cfg->picture_count * sizeof (picture_t *);<br>+    size_t size = sizeof (*pool) + count * sizeof (picture_t *);<br> <br>     size += (-size) & (POOL_MAX - 1);<br>     pool = aligned_alloc(POOL_MAX, size);<br>@@ -120,28 +111,17 @@ picture_pool_t *picture_pool_NewExtended(const picture_pool_configuration_t *cfg<br> <br>     vlc_mutex_init(&pool->lock);<br>     vlc_cond_init(&pool->wait);<br>-    if (cfg->picture_count == POOL_MAX)<br>+    if (count == POOL_MAX)<br>         pool->available = ~0ULL;<br>     else<br>-        pool->available = (1ULL << cfg->picture_count) - 1;<br>+        pool->available = (1ULL << count) - 1;<br>     atomic_init(&pool->refs,  1);<br>-    pool->picture_count = cfg->picture_count;<br>-    memcpy(pool->picture, cfg->picture,<br>-           cfg->picture_count * sizeof (picture_t *));<br>+    pool->picture_count = count;<br>+    memcpy(pool->picture, tab, count * sizeof (picture_t *));<br>     pool->canceled = false;<br>     return pool;<br> }<br> <br>-picture_pool_t *picture_pool_New(unsigned count, picture_t *const *tab)<br>-{<br>-    picture_pool_configuration_t cfg = {<br>-        .picture_count = count,<br>-        .picture = tab,<br>-    };<br>-<br>-    return picture_pool_NewExtended(&cfg);<br>-}<br>-<br> picture_pool_t *picture_pool_NewFromFormat(const video_format_t *fmt,<br>                                            unsigned count)<br> {</pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>