[vlc-devel] commit: fb: initialize p_sys->p_video to MAP_FAILED. (Jean-Paul Saman )

git version control git at videolan.org
Tue Feb 17 16:47:41 CET 2009


vlc | branch: master | Jean-Paul Saman <jpsaman at videolan.org> | Tue Feb 17 16:46:45 2009 +0100| [8b7c6b3d5f6004075bd6ec55f160627cfcab1b35] | committer: Jean-Paul Saman 

fb: initialize p_sys->p_video to MAP_FAILED.

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

 modules/video_output/fb.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/video_output/fb.c b/modules/video_output/fb.c
index 78dac63..8880b36 100644
--- a/modules/video_output/fb.c
+++ b/modules/video_output/fb.c
@@ -191,6 +191,8 @@ static int Create( vlc_object_t *p_this )
         return VLC_ENOMEM;
     memset( p_sys, 0, sizeof(vout_sys_t) );
 
+    p_sys->p_video = MAP_FAILED;
+
     p_vout->pf_init = Init;
     p_vout->pf_end = End;
     p_vout->pf_manage = Manage;
@@ -941,8 +943,7 @@ static int OpenDisplay( vout_thread_t *p_vout )
  *****************************************************************************/
 static void CloseDisplay( vout_thread_t *p_vout )
 {
-    if( p_vout->p_sys->p_video != NULL &&
-        p_vout->p_sys->p_video != MAP_FAILED )
+    if( p_vout->p_sys->p_video != MAP_FAILED )
     {
         /* Clear display */
         memset( p_vout->p_sys->p_video, 0, p_vout->p_sys->i_page_size );




More information about the vlc-devel mailing list