Commit 6942be9f authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

avformat mux: check malloc return

parent ed5614a2
......@@ -209,9 +209,14 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
return VLC_EGENERIC;
}
/* */
p_input->p_sys = malloc( sizeof( int ) );
if( unlikely(p_input->p_sys == NULL) )
return VLC_ENOMEM;
*((int *)p_input->p_sys) = p_sys->oc->nb_streams;
/* */
stream = avformat_new_stream( p_sys->oc, NULL);
if( !stream )
{
......
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