[vlc-commits] vout: fix cleanup if vd->pool() fails

Rémi Denis-Courmont git at videolan.org
Thu Apr 7 20:20:16 CEST 2016


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Apr  7 21:19:46 2016 +0300| [67017af27b049b4ac8bc83c4d669ac18a8af1f90] | committer: Rémi Denis-Courmont

vout: fix cleanup if vd->pool() fails

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

 src/video_output/video_output.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index cbc8dc0..7994bec 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1289,7 +1289,7 @@ static void ThreadExecuteCropRatio(vout_thread_t *vout,
                         0, 0, 0, 0);
 }
 
-static int ThreadStart(vout_thread_t *vout, const vout_display_state_t *state)
+static int ThreadStart(vout_thread_t *vout, vout_display_state_t *state)
 {
     vlc_mouse_Init(&vout->p->mouse);
     vout->p->decoder_fifo = picture_fifo_New();
@@ -1334,7 +1334,10 @@ static int ThreadStart(vout_thread_t *vout, const vout_display_state_t *state)
     if (vout_OpenWrapper(vout, vout->p->splitter_name, state))
         goto error;
     if (vout_InitWrapper(vout))
+    {
+        vout_CloseWrapper(vout, state);
         goto error;
+    }
     assert(vout->p->decoder_pool);
 
     vout->p->displayed.current       = NULL;



More information about the vlc-commits mailing list