[vlc-devel] [PATCH 2/3] video_output: create pictures with the display format with interactive filters

Steve Lhomme robux4 at ycbcr.xyz
Thu Aug 13 14:13:06 CEST 2020


Also used for whatever the last filter of the filter chains is.
---
 src/video_output/video_output.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 6097b9df7f9..dc636d72928 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -859,12 +859,14 @@ static void ThreadDelAllFilterCallbacks(vout_thread_sys_t *vout)
 static picture_t *VoutVideoFilterInteractiveNewPicture(filter_t *filter)
 {
     vout_thread_sys_t *sys = filter->owner.sys;
+    picture_t *picture;
 
-    picture_t *picture = picture_pool_Get(sys->private.private_pool);
-    if (picture) {
-        picture_Reset(picture);
-        video_format_CopyCropAr(&picture->format, &filter->fmt_out.video);
-    }
+    vlc_mutex_lock(&sys->display_lock);
+    if (sys->display)
+        picture =  picture_NewFromFormat(&sys->display->fmt);
+    else
+        picture = NULL;
+    vlc_mutex_unlock(&sys->display_lock);
     return picture;
 }
 
-- 
2.26.2



More information about the vlc-devel mailing list