Commit 16422e31 authored by Thomas Guillem's avatar Thomas Guillem

mp4mux: use vlc_alloc helper

parent 17d8bf44
...@@ -1146,7 +1146,7 @@ static bo_t *BuildMoov(sout_mux_t *p_mux) ...@@ -1146,7 +1146,7 @@ static bo_t *BuildMoov(sout_mux_t *p_mux)
mp4mux_trackinfo_t **pp_infos = NULL; mp4mux_trackinfo_t **pp_infos = NULL;
if(p_sys->i_nb_streams) /* Trackless moov ? */ if(p_sys->i_nb_streams) /* Trackless moov ? */
{ {
pp_infos = malloc(sizeof(mp4mux_trackinfo_t *) * p_sys->i_nb_streams); pp_infos = vlc_alloc(p_sys->i_nb_streams, sizeof(mp4mux_trackinfo_t *));
if(!pp_infos) if(!pp_infos)
return NULL; return NULL;
for(unsigned int i=0; i<p_sys->i_nb_streams; i++) for(unsigned int i=0; i<p_sys->i_nb_streams; i++)
......
...@@ -427,7 +427,7 @@ void BuildPMT( dvbpsi_t *p_dvbpsi, vlc_object_t *p_object, ...@@ -427,7 +427,7 @@ void BuildPMT( dvbpsi_t *p_dvbpsi, vlc_object_t *p_object,
unsigned i_programs, tsmux_stream_t *p_pmt, const int *pi_programs_number, unsigned i_programs, tsmux_stream_t *p_pmt, const int *pi_programs_number,
unsigned i_mapped_streams, const pes_mapped_stream_t *p_mapped_streams ) unsigned i_mapped_streams, const pes_mapped_stream_t *p_mapped_streams )
{ {
dvbpsi_pmt_t *dvbpmt = malloc( i_programs * sizeof(dvbpsi_pmt_t) ); dvbpsi_pmt_t *dvbpmt = vlc_alloc( i_programs, sizeof(dvbpsi_pmt_t) );
if( !dvbpmt ) if( !dvbpmt )
return; return;
......
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