[vlc-devel] [PATCH 3/3] picture_pool: remove unused picture_pool_OwnsPic()
Steve Lhomme
robux4 at ycbcr.xyz
Thu Jan 16 10:03:26 CET 2020
---
include/vlc_picture_pool.h | 7 -------
src/misc/picture_pool.c | 27 ---------------------------
2 files changed, 34 deletions(-)
diff --git a/include/vlc_picture_pool.h b/include/vlc_picture_pool.h
index 6fd74ba5ec8..1915032009f 100644
--- a/include/vlc_picture_pool.h
+++ b/include/vlc_picture_pool.h
@@ -138,13 +138,6 @@ VLC_API picture_t *picture_pool_Wait(picture_pool_t *) VLC_USED;
*/
void picture_pool_Cancel( picture_pool_t *, bool canceled );
-/**
- * Test if a picture belongs to the picture pool
- *
- * FIXME: remove this function when the vout_PutPicture() hack is fixed.
- */
-bool picture_pool_OwnsPic( picture_pool_t *, picture_t *);
-
/**
* Reserves pictures from a pool and creates a new pool with those.
*
diff --git a/src/misc/picture_pool.c b/src/misc/picture_pool.c
index 3d2c37d99e0..d4d2418d636 100644
--- a/src/misc/picture_pool.c
+++ b/src/misc/picture_pool.c
@@ -269,33 +269,6 @@ void picture_pool_Cancel(picture_pool_t *pool, bool canceled)
vlc_mutex_unlock(&pool->lock);
}
-bool picture_pool_OwnsPic(picture_pool_t *pool, picture_t *pic)
-{
- picture_priv_t *priv = (picture_priv_t *)pic;
-
- while (priv->gc.destroy != picture_pool_ReleasePicture) {
- if (priv->gc.opaque == NULL)
- return false; /* not a pooled picture */
-
- /* cloned picture from picture_Clone() */
- pic = priv->gc.opaque;
- priv = (picture_priv_t *)pic;
- }
-
- do {
- uintptr_t sys = (uintptr_t)priv->gc.opaque;
- picture_pool_t *picpool = (void *)(sys & ~(POOL_MAX - 1));
-
- if (pool == picpool)
- return true;
-
- pic = picpool->picture[sys & (POOL_MAX - 1 )];
- priv = (picture_priv_t *)pic;
- } while (priv->gc.destroy == picture_pool_ReleasePicture);
-
- return false;
-}
-
unsigned picture_pool_GetSize(const picture_pool_t *pool)
{
return pool->picture_count;
--
2.17.1
More information about the vlc-devel
mailing list