vlc | branch: master | Jean-Baptiste Kempf <[email protected]> | Fri Feb 26 18:22:12 2016 +0100| [6942be9f46c63e4f41b6371cba949bfe16e4a260] | committer: Jean-Baptiste Kempf
avformat mux: check malloc return > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6942be9f46c63e4f41b6371cba949bfe16e4a260 --- modules/demux/avformat/mux.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c index bf53abd..75e38f9 100644 --- a/modules/demux/avformat/mux.c +++ b/modules/demux/avformat/mux.c @@ -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 ) { _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
