[vlc-commits] mp4: fix leak in DVC1 box

Rémi Denis-Courmont git at videolan.org
Thu Nov 30 20:29:18 CET 2017


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Nov 30 21:29:05 2017 +0200| [fe8921433e5c59d9c3936fb610256c4adb54de8e] | committer: Rémi Denis-Courmont

mp4: fix leak in DVC1 box

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

 modules/demux/mp4/libmp4.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c
index 7284991d43..769a7973df 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -2385,9 +2385,14 @@ static int MP4_ReadBox_dac3( stream_t *p_stream, MP4_Box_t *p_box )
     MP4_READBOX_EXIT( 1 );
 }
 
+static void MP4_FreeBox_dvc1( MP4_Box_t *p_box )
+{
+    free( p_box->data.p_dvc1->p_vc1 );
+}
+
 static int MP4_ReadBox_dvc1( stream_t *p_stream, MP4_Box_t *p_box )
 {
-    MP4_READBOX_ENTER( MP4_Box_data_dvc1_t, NULL );
+    MP4_READBOX_ENTER( MP4_Box_data_dvc1_t, MP4_FreeBox_dvc1 );
     if( i_read < 7 )
         MP4_READBOX_EXIT( 0 );
 



More information about the vlc-commits mailing list