picture_pool: remove always NULL picture unlock callback
authorSteve Lhomme <robux4@ycbcr.xyz>
Fri, 10 Jan 2020 14:30:25 +0000 (15:30 +0100)
committerSteve Lhomme <robux4@ycbcr.xyz>
Mon, 13 Jan 2020 08:24:33 +0000 (09:24 +0100)
include/vlc_picture_pool.h
src/misc/picture_pool.c

index de385d6..6fd74ba 100644 (file)
@@ -43,7 +43,6 @@ typedef struct {
     picture_t *const *picture;
 
     int       (*lock)(picture_t *);
-    void      (*unlock)(picture_t *);
 } picture_pool_configuration_t;
 
 /**
index ee3c0b0..3d2c37d 100644 (file)
@@ -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)