[vlc-devel] [PATCH 2/2] RFC: core/vout: don't reset the display pool

Thomas Guillem thomas at gllm.fr
Tue Jan 3 16:45:25 CET 2017


In case of direct rendering, the decoder_pool (== the display_pool) should not
be reseted. Indeed, the vout display module implementation could still hold
pictures while the decoder is reseted. This fixes the warning "n picture(s)
leaked by decoder" and an assert from picture_pool_ReleasePicture() when the
vout is finally releasing the picture.
---
 src/video_output/video_output.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index cde380871b..017ed8cddb 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1210,7 +1210,8 @@ static void ThreadFlush(vout_thread_t *vout, bool below, mtime_t date)
 static void ThreadReset(vout_thread_t *vout)
 {
     ThreadFlush(vout, true, INT64_MAX);
-    if (vout->p->decoder_pool) {
+    if (vout->p->decoder_pool && vout->p->decoder_pool != vout->p->display_pool)
+    {
         unsigned count, leaks;
 
         if (vout->p->private_pool != NULL) {
-- 
2.11.0



More information about the vlc-devel mailing list