[vlc-commits] mp4: use vlc_alloc helper

Thomas Guillem git at videolan.org
Sun Nov 12 11:49:41 CET 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Sun Nov 12 11:44:00 2017 +0100| [affecf2f07af739c783d160ee3c018f0e808000d] | committer: Thomas Guillem

mp4: use vlc_alloc helper

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

 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