[vlc-commits] picture_pool: remove picture_gc_sys_t.picture
Rémi Denis-Courmont
git at videolan.org
Sun Jun 28 11:13:33 CEST 2015
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Jun 27 16:38:43 2015 +0300| [5ac3f4976b756dc01e8dfaf21af40da0893e169e] | committer: Rémi Denis-Courmont
picture_pool: remove picture_gc_sys_t.picture
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5ac3f4976b756dc01e8dfaf21af40da0893e169e
---
src/misc/picture_pool.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/misc/picture_pool.c b/src/misc/picture_pool.c
index f893062..7c4ca82 100644
--- a/src/misc/picture_pool.c
+++ b/src/misc/picture_pool.c
@@ -42,7 +42,6 @@
*****************************************************************************/
struct picture_gc_sys_t {
picture_pool_t *pool;
- picture_t *picture;
unsigned offset;
};
@@ -83,7 +82,7 @@ static void picture_pool_ReleasePicture(picture_t *picture)
picture_pool_t *pool = sys->pool;
if (pool->pic_unlock != NULL)
- pool->pic_unlock(sys->picture);
+ pool->pic_unlock(pool->picture[sys->offset]);
vlc_mutex_lock(&pool->lock);
assert(!(pool->available & (1ULL << sys->offset)));
@@ -97,15 +96,14 @@ static void picture_pool_ReleasePicture(picture_t *picture)
}
static picture_t *picture_pool_ClonePicture(picture_pool_t *pool,
- picture_t *picture,
unsigned offset)
{
+ picture_t *picture = pool->picture[offset];
picture_gc_sys_t *sys = malloc(sizeof(*sys));
if (unlikely(sys == NULL))
return NULL;
sys->pool = pool;
- sys->picture = picture;
sys->offset = offset;
picture_resource_t res = {
@@ -229,7 +227,7 @@ picture_t *picture_pool_Get(picture_pool_t *pool)
continue;
}
- clone = picture_pool_ClonePicture(pool, picture, i);
+ clone = picture_pool_ClonePicture(pool, i);
assert(unlikely(clone == NULL) || clone->p_next == NULL);
return clone;
}
More information about the vlc-commits
mailing list