[vlc-commits] picture_pool: remove unused picture_pool_OwnsPic()
Steve Lhomme
git at videolan.org
Mon Jan 20 08:25:39 CET 2020
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Jan 15 09:51:43 2020 +0100| [9e6aa466105395db2d0767136d83a6034ddf38be] | committer: Steve Lhomme
picture_pool: remove unused picture_pool_OwnsPic()
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9e6aa466105395db2d0767136d83a6034ddf38be
---
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 6fd74ba5ec..1915032009 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 3d2c37d99e..d4d2418d63 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;
More information about the vlc-commits
mailing list