Commit ab734ace authored by Jean-Paul Saman's avatar Jean-Paul Saman Committed by Jean-Paul Saman

Check return value of malloc()

parent 30d0645a
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* demux.c: demuxer using ffmpeg (libavformat). * demux.c: demuxer using ffmpeg (libavformat).
***************************************************************************** *****************************************************************************
* Copyright (C) 2004 the VideoLAN team * Copyright (C) 2004 the VideoLAN team
* $Id$ * $Id: 95d2460bf93b85608fa27565f1475aadd8a57360 $
* *
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@videolan.org> * Gildas Bazin <gbazin@videolan.org>
...@@ -142,6 +142,8 @@ int E_(OpenDemux)( vlc_object_t *p_this ) ...@@ -142,6 +142,8 @@ int E_(OpenDemux)( vlc_object_t *p_this )
p_demux->pf_demux = Demux; p_demux->pf_demux = Demux;
p_demux->pf_control = Control; p_demux->pf_control = Control;
p_demux->p_sys = p_sys = malloc( sizeof( demux_sys_t ) ); p_demux->p_sys = p_sys = malloc( sizeof( demux_sys_t ) );
if( !p_sys )
return VLC_ENOMEM;
p_sys->ic = 0; p_sys->ic = 0;
p_sys->fmt = fmt; p_sys->fmt = fmt;
p_sys->i_tk = 0; p_sys->i_tk = 0;
......
...@@ -82,7 +82,7 @@ static int OpenFilterEx( vlc_object_t *p_this, vlc_bool_t b_enable_croppadd ) ...@@ -82,7 +82,7 @@ static int OpenFilterEx( vlc_object_t *p_this, vlc_bool_t b_enable_croppadd )
p_filter->fmt_in.video.i_width != p_filter->fmt_out.video.i_width || p_filter->fmt_in.video.i_width != p_filter->fmt_out.video.i_width ||
p_filter->fmt_in.video.i_height != p_filter->fmt_out.video.i_height; p_filter->fmt_in.video.i_height != p_filter->fmt_out.video.i_height;
if ( b_enable_croppadd ) if ( b_enable_croppadd )
{ {
b_resize = b_resize || b_resize = b_resize ||
p_filter->fmt_in.video.i_visible_width != p_filter->fmt_in.video.i_width || p_filter->fmt_in.video.i_visible_width != p_filter->fmt_in.video.i_width ||
...@@ -164,7 +164,6 @@ int E_(OpenCropPadd)( vlc_object_t *p_this ) ...@@ -164,7 +164,6 @@ int E_(OpenCropPadd)( vlc_object_t *p_this )
return OpenFilterEx( p_this, VLC_TRUE ); return OpenFilterEx( p_this, VLC_TRUE );
} }
/***************************************************************************** /*****************************************************************************
* CloseFilter: clean up the filter * CloseFilter: clean up the filter
*****************************************************************************/ *****************************************************************************/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment