[vlc-commits] picture_pool: remove no longer used ticks
Rémi Denis-Courmont
git at videolan.org
Fri Jun 26 20:19:33 CEST 2015
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jun 25 21:12:17 2015 +0300| [7958946b5a31f259f4f3b65005e2deda2d096e96] | committer: Rémi Denis-Courmont
picture_pool: remove no longer used ticks
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7958946b5a31f259f4f3b65005e2deda2d096e96
---
src/misc/picture_pool.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/src/misc/picture_pool.c b/src/misc/picture_pool.c
index eeedd37..44921b2 100644
--- a/src/misc/picture_pool.c
+++ b/src/misc/picture_pool.c
@@ -42,11 +42,9 @@ struct picture_gc_sys_t {
picture_pool_t *pool;
picture_t *picture;
bool in_use;
- uint64_t tick;
};
struct picture_pool_t {
- uint64_t tick;
int (*pic_lock)(picture_t *);
void (*pic_unlock)(picture_t *);
vlc_mutex_t lock;
@@ -108,7 +106,6 @@ static picture_t *picture_pool_ClonePicture(picture_pool_t *pool,
sys->pool = pool;
sys->picture = picture;
sys->in_use = false;
- sys->tick = 0;
picture_resource_t res = {
.p_sys = picture->p_sys,
@@ -137,7 +134,6 @@ picture_pool_t *picture_pool_NewExtended(const picture_pool_configuration_t *cfg
if (unlikely(pool == NULL))
return NULL;
- pool->tick = 1;
pool->pic_lock = cfg->lock;
pool->pic_unlock = cfg->unlock;
vlc_mutex_init(&pool->lock);
@@ -223,13 +219,11 @@ picture_t *picture_pool_Get(picture_pool_t *pool)
picture_t *picture = pool->picture[i];
picture_priv_t *priv = (picture_priv_t *)picture;
picture_gc_sys_t *sys = priv->gc.opaque;
- uint64_t tick;
if (sys->in_use)
continue;
pool->refs++;
- tick = ++pool->tick;
sys->in_use = true;
vlc_mutex_unlock(&pool->lock);
@@ -240,8 +234,6 @@ picture_t *picture_pool_Get(picture_pool_t *pool)
continue;
}
- sys->tick = tick;
-
assert(atomic_load(&((picture_priv_t *)picture)->gc.refs) == 0);
atomic_init(&((picture_priv_t *)picture)->gc.refs, 1);
picture->p_next = NULL;
More information about the vlc-commits
mailing list