Commit e0a5dde7 authored by Jean-Paul Saman's avatar Jean-Paul Saman

stream_out/autodel.c: check malloc return value

If allocating fails, then graciously fail instead of crash.
parent c43b8d99
......@@ -81,6 +81,8 @@ static int Open( vlc_object_t *p_this )
sout_stream_sys_t *p_sys;
p_sys = malloc( sizeof( sout_stream_sys_t ) );
if( !p_sys )
return VLC_ENOMEM;
if( !p_stream->p_next )
{
......@@ -120,6 +122,8 @@ static sout_stream_id_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
{
sout_stream_sys_t *p_sys = (sout_stream_sys_t *)p_stream->p_sys;
sout_stream_id_t *p_es = malloc( sizeof(sout_stream_id_t) );
if( !p_es )
return NULL;
p_es->fmt = *p_fmt;
p_es->id = NULL;
......
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