/*****************************************************************************
* fb.c : framebuffer plugin for vlc
*****************************************************************************
- * Copyright (C) 2000, 2001 the VideoLAN team
+ * Copyright (C) 2000-2009 the VideoLAN team
* $Id$
*
* Authors: Samuel Hocevar <sam@zoy.org>
struct termios new_termios;
/* Allocate instance and initialize some members */
- p_vout->p_sys = p_sys = malloc( sizeof( vout_sys_t ) );
+ p_vout->p_sys = p_sys = calloc( 1, sizeof( vout_sys_t ) );
if( p_vout->p_sys == NULL )
return VLC_ENOMEM;
- memset( p_sys, 0, sizeof(vout_sys_t) );
p_sys->p_video = MAP_FAILED;
if( p_sys->b_tty && !isatty( 0 ) )
{
msg_Warn( p_vout, "fd 0 is not a TTY" );
+ free( p_sys );
return VLC_EGENERIC;
}
else
psz_chroma );
}
free( psz_chroma );
- psz_chroma = NULL;
}
p_sys->i_aspect = -1;
atoi( psz_aspect ), atoi( psz_parser ) );
free( psz_aspect );
- psz_aspect = NULL;
}
p_sys->b_auto = false;
case 4:
default:
p_sys->b_auto = true;
- break;
}
/* tty handling */
return VLC_EGENERIC;
}
free( psz_device );
- psz_device = NULL;
/* Get framebuffer device information */
if( ioctl( p_sys->i_fd, FBIOGET_VSCREENINFO, &p_sys->var_info ) )