[vlc-devel] [PATCH 11/16] video_output: explicitly use the displayed.XXX pictures as filter chain inputs

Steve Lhomme robux4 at ycbcr.xyz
Fri Oct 16 16:26:42 CEST 2020


---
 src/video_output/video_output.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 3b3c8e36bd1..28c357cb607 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1139,7 +1139,7 @@ static picture_t *ThreadDisplayPreparePicture(vout_thread_sys_t *vout, bool reus
         sys->displayed.timestamp     = decoded->date;
         sys->displayed.is_interlaced = !decoded->b_progressive;
 
-        picture = filter_chain_VideoFilter(sys->filter.chain_static, decoded);
+        picture = filter_chain_VideoFilter(sys->filter.chain_static, sys->displayed.decoded);
     }
 
     vlc_mutex_unlock(&sys->filter.lock);
@@ -1215,12 +1215,13 @@ static int ThreadDisplayRenderPicture(vout_thread_sys_t *vout, bool is_forced)
 {
     vout_thread_sys_t *sys = vout;
 
-    picture_t *torender = picture_Hold(sys->displayed.current);
+    // hold it as the filter chain will release it or return it and we release it
+    picture_Hold(sys->displayed.current);
 
     vout_chrono_Start(&sys->render);
 
     vlc_mutex_lock(&sys->filter.lock);
-    picture_t *filtered = filter_chain_VideoFilter(sys->filter.chain_interactive, torender);
+    picture_t *filtered = filter_chain_VideoFilter(sys->filter.chain_interactive, sys->displayed.current);
     vlc_mutex_unlock(&sys->filter.lock);
 
     if (!filtered)
-- 
2.26.2



More information about the vlc-devel mailing list