From c28bafcfb6a6b564bbce4105c4ea83fe81865585 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 28 Jul 2013 00:10:58 +0200 Subject: mp_image_pool: make reference counting thread-safe See previous commits. Also simplify this thing: 2 flags per pool image are enough to avoid a weird central refcount and an associated shared object keeping the refcount. We could even just store these two flags in the mp_image itself (like in mp_image.flags or mp_image.priv), but let's not for the sake of readability. --- video/mp_image_pool.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'video/mp_image_pool.h') diff --git a/video/mp_image_pool.h b/video/mp_image_pool.h index fdb0e76c39..0982fd94f8 100644 --- a/video/mp_image_pool.h +++ b/video/mp_image_pool.h @@ -1,13 +1,7 @@ #ifndef MPV_MP_IMAGE_POOL_H #define MPV_MP_IMAGE_POOL_H -struct mp_image_pool { - int max_count; - - struct mp_image **images; - int num_images; - struct pool_trampoline *trampoline; -}; +struct mp_image_pool; struct mp_image_pool *mp_image_pool_new(int max_count); struct mp_image *mp_image_pool_get(struct mp_image_pool *pool, unsigned int fmt, -- cgit v1.2.3