Commit 8c322e4b authored by ssbssa's avatar ssbssa Committed by Jean-Baptiste Kempf

avformat: fix memory leak on unhandled ES category

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 4076e83d
......@@ -203,15 +203,15 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
}
}
p_input->p_sys = malloc( sizeof( int ) );
*((int *)p_input->p_sys) = p_sys->oc->nb_streams;
if( fmt->i_cat != VIDEO_ES && fmt->i_cat != AUDIO_ES)
{
msg_Warn( p_mux, "Unhandled ES category" );
return VLC_EGENERIC;
}
p_input->p_sys = malloc( sizeof( int ) );
*((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