[vlc-commits] vout_wrapper: don't use an uninitialized display with non-direct rendering

Steve Lhomme git at videolan.org
Wed Dec 19 16:53:43 CET 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Dec 19 10:57:20 2018 +0100| [b40940e1c2de1e454fe6d02c35b952e95146c458] | committer: Steve Lhomme

vout_wrapper: don't use an uninitialized display with non-direct rendering

In the first call vd is not set yet on sys->display.vd

Broken since 706d291795ca4f5740757ec7bd65af7a6bd86dd1

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

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

diff --git a/src/video_output/vout_wrapper.c b/src/video_output/vout_wrapper.c
index 3e1615a2b5..74033cf14a 100644
--- a/src/video_output/vout_wrapper.c
+++ b/src/video_output/vout_wrapper.c
@@ -46,10 +46,10 @@ 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)
+static void NoDrInit(vout_thread_sys_t *sys, vout_display_t *vd)
 {
     if (sys->display.use_dr)
-        sys->display_pool = vout_GetPool(sys->display.vd, 3);
+        sys->display_pool = vout_GetPool(vd, 3);
     else
         sys->display_pool = NULL;
 }
@@ -117,7 +117,7 @@ int vout_OpenWrapper(vout_thread_t *vout,
         } else {
             sys->dpb_size = picture_pool_GetSize(sys->decoder_pool) - reserved_picture;
         }
-        NoDrInit(sys);
+        NoDrInit(sys, vd);
     }
     sys->private_pool = picture_pool_Reserve(sys->decoder_pool, private_picture);
     if (!sys->private_pool)
@@ -173,7 +173,7 @@ void vout_ManageWrapper(vout_thread_t *vout)
 
     if (vout_ManageDisplay(vd)) {
         sys->display.use_dr = !vout_IsDisplayFiltered(vd);
-        NoDrInit(sys);
+        NoDrInit(sys, vd);
     }
 }
 



More information about the vlc-commits mailing list