[vlc-devel] [PATCH] picture_pool: remove always NULL picture unlock callback
Steve Lhomme
robux4 at ycbcr.xyz
Fri Jan 10 16:18:52 CET 2020
Hopefully the lock, only used by MMAL, will also go away.
On 2020-01-10 16:01, Steve Lhomme wrote:
> ---
> include/vlc_picture_pool.h | 1 -
> src/misc/picture_pool.c | 4 ----
> 2 files changed, 5 deletions(-)
>
> diff --git a/include/vlc_picture_pool.h b/include/vlc_picture_pool.h
> index de385d6a984..6fd74ba5ec8 100644
> --- a/include/vlc_picture_pool.h
> +++ b/include/vlc_picture_pool.h
> @@ -43,7 +43,6 @@ typedef struct {
> picture_t *const *picture;
>
> int (*lock)(picture_t *);
> - void (*unlock)(picture_t *);
> } picture_pool_configuration_t;
>
> /**
> diff --git a/src/misc/picture_pool.c b/src/misc/picture_pool.c
> index ee3c0b0cbf1..3d2c37d99e0 100644
> --- a/src/misc/picture_pool.c
> +++ b/src/misc/picture_pool.c
> @@ -40,7 +40,6 @@ static_assert ((POOL_MAX & (POOL_MAX - 1)) == 0, "Not a power of two");
>
> struct picture_pool_t {
> int (*pic_lock)(picture_t *);
> - void (*pic_unlock)(picture_t *);
> vlc_mutex_t lock;
> vlc_cond_t wait;
>
> @@ -77,8 +76,6 @@ static void picture_pool_ReleasePicture(picture_t *clone)
> unsigned offset = sys & (POOL_MAX - 1);
> picture_t *picture = pool->picture[offset];
>
> - if (pool->pic_unlock != NULL)
> - pool->pic_unlock(picture);
> picture_Release(picture);
>
> vlc_mutex_lock(&pool->lock);
> @@ -114,7 +111,6 @@ picture_pool_t *picture_pool_NewExtended(const picture_pool_configuration_t *cfg
> return NULL;
>
> pool->pic_lock = cfg->lock;
> - pool->pic_unlock = cfg->unlock;
> vlc_mutex_init(&pool->lock);
> vlc_cond_init(&pool->wait);
> if (cfg->picture_count == POOL_MAX)
> --
> 2.17.1
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
>
More information about the vlc-devel
mailing list