[vlc-commits] mp4: use vlc_alloc helper

Thomas Guillem git at videolan.org
Sun Nov 12 14:25:51 CET 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Sun Nov 12 11:44:00 2017 +0100| [37f3f80bee3d33810b19b53b38e2ec108dd76931] | committer: RĂ©mi Denis-Courmont

mp4: use vlc_alloc helper

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=37f3f80bee3d33810b19b53b38e2ec108dd76931
---

 modules/demux/mp4/libmp4.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c
index e8fe51d01c..4f575bdc21 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -3618,7 +3618,7 @@ static int MP4_ReadBox_HMMT( stream_t *p_stream, MP4_Box_t *p_box )
     if( p_hmmt->i_chapter_count > MAX_CHAPTER_COUNT )
         p_hmmt->i_chapter_count = MAX_CHAPTER_COUNT;
 
-    p_hmmt->pi_chapter_start = malloc( p_hmmt->i_chapter_count * sizeof(uint32_t) );
+    p_hmmt->pi_chapter_start = vlc_alloc( p_hmmt->i_chapter_count, sizeof(uint32_t) );
     if( p_hmmt->pi_chapter_start == NULL )
         MP4_READBOX_EXIT( 0 );
 



More information about the vlc-commits mailing list