[vlc-commits] vout_wrapper: inline NoDrInit()

Rémi Denis-Courmont git at videolan.org
Wed Dec 26 13:31:51 CET 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Dec 26 13:12:46 2018 +0200| [9c5ecaefb0a661cf5c9c7fe3ff0df46bd2ee30a8] | committer: Rémi Denis-Courmont

vout_wrapper: inline NoDrInit()

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9c5ecaefb0a661cf5c9c7fe3ff0df46bd2ee30a8
---

 src/video_output/vout_wrapper.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/video_output/vout_wrapper.c b/src/video_output/vout_wrapper.c
index c4415466bd..2ee3c9dd1a 100644
--- a/src/video_output/vout_wrapper.c
+++ b/src/video_output/vout_wrapper.c
@@ -46,14 +46,6 @@ static int  Forward(vlc_object_t *, char const *,
 /* Minimum number of display picture */
 #define DISPLAY_PICTURE_COUNT (1)
 
-static void NoDrInit(vout_thread_sys_t *sys, vout_display_t *vd)
-{
-    if (sys->display.use_dr)
-        sys->display_pool = vout_GetPool(vd, 3);
-    else
-        sys->display_pool = NULL;
-}
-
 /*****************************************************************************
  *
  *****************************************************************************/
@@ -117,7 +109,10 @@ int vout_OpenWrapper(vout_thread_t *vout,
         } else {
             sys->dpb_size = picture_pool_GetSize(sys->decoder_pool) - reserved_picture;
         }
-        NoDrInit(sys, vd);
+        if (sys->display.use_dr)
+            sys->display_pool = vout_GetPool(vd, 3);
+        else
+            sys->display_pool = NULL;
     }
     sys->private_pool = picture_pool_Reserve(sys->decoder_pool, private_picture);
     if (!sys->private_pool)
@@ -172,8 +167,13 @@ void vout_ManageWrapper(vout_thread_t *vout)
     vout_display_t *vd = sys->display.vd;
 
     if (vout_ManageDisplay(vd)) {
+        assert(vd->info.has_pictures_invalid);
         sys->display.use_dr = !vout_IsDisplayFiltered(vd);
-        NoDrInit(sys, vd);
+
+        if (sys->display.use_dr)
+            sys->display_pool = vout_GetPool(vd, 3);
+        else
+            sys->display_pool = NULL;
     }
 }
 



More information about the vlc-commits mailing list