Commit 6f78ecc7 authored by Francois Cartegnie's avatar Francois Cartegnie

mux: mp4: fix leaks on failed allocs (cid #1313792, #1313791, #1313790)

parent a9c4efde
...@@ -1192,6 +1192,7 @@ static bo_t *GetStblBox(vlc_object_t *p_obj, mp4mux_trackinfo_t *p_track, bool b ...@@ -1192,6 +1192,7 @@ static bo_t *GetStblBox(vlc_object_t *p_obj, mp4mux_trackinfo_t *p_track, bool b
{ {
bo_free(stsd); bo_free(stsd);
bo_free(stco); bo_free(stco);
bo_free(stsc);
return NULL; return NULL;
} }
bo_add_32be(stts, 0); // entry-count (fixed latter) bo_add_32be(stts, 0); // entry-count (fixed latter)
...@@ -1299,6 +1300,7 @@ static bo_t *GetStblBox(vlc_object_t *p_obj, mp4mux_trackinfo_t *p_track, bool b ...@@ -1299,6 +1300,7 @@ static bo_t *GetStblBox(vlc_object_t *p_obj, mp4mux_trackinfo_t *p_track, bool b
bo_free(stts); bo_free(stts);
bo_free(stsz); bo_free(stsz);
bo_free(stss); bo_free(stss);
bo_free(ctts);
return NULL; return NULL;
} }
box_gather(stbl, stsd); box_gather(stbl, stsd);
...@@ -1689,7 +1691,7 @@ bo_t * GetMoovBox(vlc_object_t *p_obj, mp4mux_trackinfo_t **pp_tracks, unsigned ...@@ -1689,7 +1691,7 @@ bo_t * GetMoovBox(vlc_object_t *p_obj, mp4mux_trackinfo_t **pp_tracks, unsigned
/* append dinf to mdia */ /* append dinf to mdia */
box_gather(minf, dinf); box_gather(minf, dinf);
} }
else bo_free(dinf); else bo_free(dref);
} }
/* add stbl */ /* add stbl */
......
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