demux: mp4: correctly match release function
authorFrancois Cartegnie <fcartegnie@free.fr>
Mon, 3 Aug 2015 13:17:32 +0000 (15:17 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Mon, 3 Aug 2015 16:43:00 +0000 (18:43 +0200)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/demux/mp4/libmp4.c

index 331262b..f220e51 100644 (file)
@@ -3643,6 +3643,11 @@ void MP4_BoxFree( stream_t *s, MP4_Box_t *p_box )
     {
         for( i_index = 0; ; i_index++ )
         {
+            if ( MP4_Box_Function[i_index].i_parent &&
+                 p_box->p_father &&
+                 p_box->p_father->i_type != MP4_Box_Function[i_index].i_parent )
+                continue;
+
             if( ( MP4_Box_Function[i_index].i_type == p_box->i_type )||
                 ( MP4_Box_Function[i_index].i_type == 0 ) )
             {