[vlc-devel] [PATCH 6/6] vout: remove picture_pool_Reset()

Thomas Guillem thomas at gllm.fr
Thu Jan 5 14:37:44 CET 2017


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

diff --git a/src/misc/picture_pool.c b/src/misc/picture_pool.c
index 3d5e6a37ff..1c85af327e 100644
--- a/src/misc/picture_pool.c
+++ b/src/misc/picture_pool.c
@@ -302,20 +302,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;
diff --git a/src/misc/picture_pool.h b/src/misc/picture_pool.h
index 4296970f29..16b92bf3b4 100644
--- a/src/misc/picture_pool.h
+++ b/src/misc/picture_pool.h
@@ -21,18 +21,6 @@
 #include <vlc_picture_pool.h>
 
 /**
- * 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
-- 
2.11.0



More information about the vlc-devel mailing list