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

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


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

mp4: fix leak in DVC1 box

(cherry picked from commit fe8921433e5c59d9c3936fb610256c4adb54de8e)

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

 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 6531dab768..118d2f10f4 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -2353,9 +2353,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