[vlc-devel] commit: Fix some valgrind warnings. (Antoine Cellerier )
git version control
git at videolan.org
Sat Mar 28 17:10:24 CET 2009
vlc | branch: master | Antoine Cellerier <dionoea at videolan.org> | Sat Mar 28 16:32:14 2009 +0100| [092e8726fd4ba60568f15be3312d764b6e6b6fef] | committer: Antoine Cellerier
Fix some valgrind warnings.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=092e8726fd4ba60568f15be3312d764b6e6b6fef
---
modules/access/v4l2.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/modules/access/v4l2.c b/modules/access/v4l2.c
index 98c729e..cff1da0 100644
--- a/modules/access/v4l2.c
+++ b/modules/access/v4l2.c
@@ -1556,7 +1556,7 @@ static float GetMaxFrameRate( demux_t *p_demux, int i_fd,
#endif
/* This is new in Linux 2.6.19 */
struct v4l2_frmivalenum frmival;
- frmival.index = 0;
+ memset( &frmival, 0, sizeof(frmival) );
frmival.pixel_format = i_pixel_format;
frmival.width = i_width;
frmival.height = i_height;
@@ -1599,7 +1599,7 @@ static float GetAbsoluteMaxFrameRate( demux_t *p_demux, int i_fd,
#endif
/* This is new in Linux 2.6.19 */
struct v4l2_frmsizeenum frmsize;
- frmsize.index = 0;
+ memset( &frmsize, 0, sizeof(frmsize) );
frmsize.pixel_format = i_pixel_format;
if( v4l2_ioctl( i_fd, VIDIOC_ENUM_FRAMESIZES, &frmsize ) >= 0 )
{
@@ -1660,7 +1660,7 @@ static void GetMaxDimensions( demux_t *p_demux, int i_fd,
#endif
/* This is new in Linux 2.6.19 */
struct v4l2_frmsizeenum frmsize;
- frmsize.index = 0;
+ memset( &frmsize, 0, sizeof(frmsize) );
frmsize.pixel_format = i_pixel_format;
if( v4l2_ioctl( i_fd, VIDIOC_ENUM_FRAMESIZES, &frmsize ) >= 0 )
{
@@ -2031,7 +2031,7 @@ static int OpenVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, bool b_demux )
/* This is new in Linux 2.6.19 */
/* List supported frame rates */
struct v4l2_frmivalenum frmival;
- frmival.index = 0;
+ memset( &frmival, 0, sizeof(frmival) );
frmival.pixel_format = fmt.fmt.pix.pixelformat;
frmival.width = p_sys->i_width;
frmival.height = p_sys->i_height;
@@ -2247,7 +2247,7 @@ static bool ProbeVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys,
if( p_sys->dev_cap.capabilities & V4L2_CAP_VIDEO_CAPTURE )
{
struct v4l2_input t_input;
- t_input.index = 0;
+ memset( &t_input, 0, sizeof(t_input) );
while( v4l2_ioctl( i_fd, VIDIOC_ENUMINPUT, &t_input ) >= 0 )
{
p_sys->i_input++;
@@ -2453,7 +2453,7 @@ static bool ProbeVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys,
/* This is new in Linux 2.6.19 */
/* List valid frame sizes for this format */
struct v4l2_frmsizeenum frmsize;
- frmsize.index = 0;
+ memset( &frmsize, 0, sizeof(frmsize) );
frmsize.pixel_format = p_sys->p_codecs[i_index].pixelformat;
if( v4l2_ioctl( i_fd, VIDIOC_ENUM_FRAMESIZES, &frmsize ) < 0 )
{
More information about the vlc-devel
mailing list