[vlc-devel] [PATCH 2/2] video_output: merge the 2 almost identical vout_display_Prepare() calls

Steve Lhomme robux4 at ycbcr.xyz
Sat Oct 27 08:37:12 CEST 2018


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

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 52e8db031f..9566376783 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1197,14 +1197,14 @@ static int ThreadDisplayRenderPicture(vout_thread_t *vout, bool is_forced)
         return VLC_EGENERIC;
     }
 
-    if (sys->display.use_dr) {
-        vout_display_Prepare(vd, todisplay, subpic, todisplay->date);
-    } else {
-        if (!do_dr_spu && !do_early_spu && sys->spu_blend && subpic)
-            picture_BlendSubpicture(todisplay, sys->spu_blend, subpic);
-        vout_display_Prepare(vd, todisplay, do_dr_spu ? subpic : NULL,
-                             todisplay->date);
+    if ( subpic &&
+         !sys->display.use_dr && !do_dr_spu && !do_early_spu && sys->spu_blend)
+    {
+        picture_BlendSubpicture(todisplay, sys->spu_blend, subpic);
+
     }
+    vout_display_Prepare(vd, todisplay,
+            sys->display.use_dr || do_dr_spu ? subpic : NULL, todisplay->date);
 
     vout_chrono_Stop(&sys->render);
 #if 0
-- 
2.17.0



More information about the vlc-devel mailing list