[vlc-commits] v4l2: use malloc()
Rémi Denis-Courmont
git at videolan.org
Thu Apr 12 22:01:50 CEST 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Apr 12 23:01:43 2012 +0300| [c3cba318609773d29bd591b38e8ba7ace7ce6f98] | committer: Rémi Denis-Courmont
v4l2: use malloc()
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c3cba318609773d29bd591b38e8ba7ace7ce6f98
---
modules/access/v4l2/demux.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/modules/access/v4l2/demux.c b/modules/access/v4l2/demux.c
index 7cf3a51..f440159 100644
--- a/modules/access/v4l2/demux.c
+++ b/modules/access/v4l2/demux.c
@@ -67,8 +67,8 @@ int DemuxOpen( vlc_object_t *obj )
{
demux_t *demux = (demux_t *)obj;
- demux_sys_t *sys = calloc( 1, sizeof( demux_sys_t ) );
- if( unlikely(sys == NULL) )
+ demux_sys_t *sys = malloc (sizeof (*sys));
+ if (unlikely(sys == NULL))
return VLC_ENOMEM;
demux->p_sys = sys;
@@ -371,6 +371,7 @@ static int InitVideo (demux_t *demux, int fd)
msg_Dbg (demux, "%d bytes maximum for complete image",
fmt.fmt.pix.sizeimage);
/* Check interlacing */
+ sys->block_flags = 0;
switch (fmt.fmt.pix.field)
{
case V4L2_FIELD_NONE:
More information about the vlc-commits
mailing list