[vlc-devel] [PATCH 2/2] picture_pool: fails instead of assert

Thomas Guillem thomas at gllm.fr
Tue Nov 4 09:52:49 CET 2014


---
 src/misc/picture_pool.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/misc/picture_pool.c b/src/misc/picture_pool.c
index fdd9b8e..978b0db 100644
--- a/src/misc/picture_pool.c
+++ b/src/misc/picture_pool.c
@@ -208,7 +208,8 @@ error:
 
 picture_pool_t *picture_pool_Reserve(picture_pool_t *master, unsigned count)
 {
-    assert(master->pic_unlock == NULL);
+    if (master->pic_unlock != NULL)
+        return NULL;
 
     picture_t *picture[count ? count : 1];
     unsigned i;
-- 
2.1.1




More information about the vlc-devel mailing list