[vlc-devel] commit: Fixed segfault when xcb xvideo open failed. (Laurent Aimar )

git version control git at videolan.org
Fri Aug 28 21:47:42 CEST 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Fri Aug 28 21:46:39 2009 +0200| [de4abf387343bd5b6a75bf71a4611273e3362856] | committer: Laurent Aimar 

Fixed segfault when xcb xvideo open failed.

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

 modules/video_output/xcb/xvideo.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/modules/video_output/xcb/xvideo.c b/modules/video_output/xcb/xvideo.c
index f0fb9f0..f2b80f3 100644
--- a/modules/video_output/xcb/xvideo.c
+++ b/modules/video_output/xcb/xvideo.c
@@ -317,6 +317,10 @@ static int Open (vlc_object_t *obj)
         return VLC_EGENERIC;
     }
 
+    /* */
+    p_sys->att = NULL;
+    p_sys->pool = NULL;
+
     /* Cache adaptors infos */
     p_sys->adaptors = GetAdaptors (p_sys->embed, p_sys->conn);
     if (p_sys->adaptors == NULL)
@@ -326,7 +330,6 @@ static int Open (vlc_object_t *obj)
     video_format_t fmt = vd->fmt;
     // TODO !
 #if 1
-    p_sys->att = NULL;
     bool found_adaptor = false;
 
     /* FIXME: check max image size */




More information about the vlc-devel mailing list