[vlc-commits] vout: remove picture_pool_Reset()

Thomas Guillem git at videolan.org
Wed Jan 18 07:54:18 CET 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Jan  5 11:30:37 2017 +0100| [1f8bbc5cb14c6dd1479c48237ba72692e0fe3d07] | committer: Thomas Guillem

vout: remove picture_pool_Reset()

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1f8bbc5cb14c6dd1479c48237ba72692e0fe3d07
---

 include/vlc_picture_pool.h | 12 ------------
 src/misc/picture_pool.c    | 14 --------------
 2 files changed, 26 deletions(-)

diff --git a/include/vlc_picture_pool.h b/include/vlc_picture_pool.h
index 69a3d13..679e986 100644
--- a/include/vlc_picture_pool.h
+++ b/include/vlc_picture_pool.h
@@ -146,18 +146,6 @@ VLC_API void picture_pool_Enum( picture_pool_t *,
                                 void (*cb)(void *, picture_t *), void *data );
 
 /**
- * Forcefully return all pictures in the pool to free/unallocated state.
- *
- * @warning If any picture in the pool is not free, this function will leak
- * and may eventually cause invalid memory accesses.
- *
- * @note This function has no effects if all pictures in the pool are free.
- *
- * @return the number of picture references that were freed
- */
-unsigned picture_pool_Reset( picture_pool_t * );
-
-/**
  * Cancel the picture pool.
  *
  * It won't return any pictures via picture_pool_Get or picture_pool_Wait if
diff --git a/src/misc/picture_pool.c b/src/misc/picture_pool.c
index 8a507ac..348d136 100644
--- a/src/misc/picture_pool.c
+++ b/src/misc/picture_pool.c
@@ -288,20 +288,6 @@ void picture_pool_Cancel(picture_pool_t *pool, bool canceled)
     vlc_mutex_unlock(&pool->lock);
 }
 
-unsigned picture_pool_Reset(picture_pool_t *pool)
-{
-    unsigned ret;
-
-    vlc_mutex_lock(&pool->lock);
-    assert(pool->refs > 0);
-    ret = pool->picture_count - popcountll(pool->available);
-    pool->available = (1ULL << pool->picture_count) - 1;
-    pool->canceled = false;
-    vlc_mutex_unlock(&pool->lock);
-
-    return ret;
-}
-
 unsigned picture_pool_GetSize(const picture_pool_t *pool)
 {
     return pool->picture_count;



More information about the vlc-commits mailing list