[vlc-commits] demux: mp4: remove unused param in MP4_Free

Francois Cartegnie git at videolan.org
Wed Sep 9 11:46:29 CEST 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Sep  8 19:17:41 2015 +0200| [6ad32e53faa06c001b3e0ea5b80bba67c07d11c8] | committer: Francois Cartegnie

demux: mp4: remove unused param in MP4_Free

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

 modules/demux/dash/mp4/AtomsReader.cpp    |    2 +-
 modules/demux/mp4/libmp4.c                |   10 +++++-----
 modules/demux/mp4/libmp4.h                |    2 +-
 modules/demux/mp4/mp4.c                   |   16 ++++++++--------
 modules/stream_filter/smooth/downloader.c |    2 +-
 5 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/modules/demux/dash/mp4/AtomsReader.cpp b/modules/demux/dash/mp4/AtomsReader.cpp
index ce2fa53..044962d 100644
--- a/modules/demux/dash/mp4/AtomsReader.cpp
+++ b/modules/demux/dash/mp4/AtomsReader.cpp
@@ -35,7 +35,7 @@ AtomsReader::~AtomsReader()
     while(rootbox && rootbox->p_first)
     {
         MP4_Box_t *p_next = rootbox->p_first->p_next;
-        MP4_BoxFree( (stream_t *)object, rootbox->p_first );
+        MP4_BoxFree( rootbox->p_first );
         rootbox->p_first = p_next;
     }
     delete rootbox;
diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c
index 1063110..314bd26 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -234,7 +234,7 @@ static MP4_Box_t *MP4_ReadBoxRestricted( stream_t *p_stream, MP4_Box_t *p_father
     if( MP4_Box_Read_Specific( p_stream, p_box, p_father ) != VLC_SUCCESS )
     {
         msg_Warn( p_stream, "Failed reading box %4.4s", (char*) &peekbox.i_type );
-        MP4_BoxFree( p_stream, p_box );
+        MP4_BoxFree( p_box );
         return NULL;
     }
 
@@ -4046,7 +4046,7 @@ static MP4_Box_t *MP4_ReadBox( stream_t *p_stream, MP4_Box_t *p_father )
     if( MP4_Box_Read_Specific( p_stream, p_box, p_father ) != VLC_SUCCESS )
     {
         uint64_t i_end = p_box->i_pos + p_box->i_size;
-        MP4_BoxFree( p_stream, p_box );
+        MP4_BoxFree( p_box );
         MP4_Seek( p_stream, i_end ); /* Skip the failed box */
         return NULL;
     }
@@ -4058,7 +4058,7 @@ static MP4_Box_t *MP4_ReadBox( stream_t *p_stream, MP4_Box_t *p_father )
  * MP4_FreeBox : free memory after read with MP4_ReadBox and all
  * the children
  *****************************************************************************/
-void MP4_BoxFree( stream_t *s, MP4_Box_t *p_box )
+void MP4_BoxFree( MP4_Box_t *p_box )
 {
     MP4_Box_t    *p_child;
 
@@ -4070,7 +4070,7 @@ void MP4_BoxFree( stream_t *s, MP4_Box_t *p_box )
         MP4_Box_t *p_next;
 
         p_next = p_child->p_next;
-        MP4_BoxFree( s, p_child );
+        MP4_BoxFree( p_child );
         p_child = p_next;
     }
 
@@ -4247,7 +4247,7 @@ MP4_Box_t *MP4_BoxGetRoot( stream_t *p_stream )
     return p_root;
 
 error:
-    free( p_root );
+    free( p_vroot );
     MP4_Seek( p_stream, 0 );
     return NULL;
 }
diff --git a/modules/demux/mp4/libmp4.h b/modules/demux/mp4/libmp4.h
index aa1b634..bcaacff 100644
--- a/modules/demux/mp4/libmp4.h
+++ b/modules/demux/mp4/libmp4.h
@@ -1675,7 +1675,7 @@ MP4_Box_t *MP4_BoxGetRoot( stream_t * );
  * XXX : all children have to be allocated by a malloc !! and
  *         p_box is freed
  *****************************************************************************/
-void MP4_BoxFree( stream_t *, MP4_Box_t *p_box );
+void MP4_BoxFree( MP4_Box_t *p_box );
 
 /*****************************************************************************
  * MP4_DumpBoxStructure: print the structure of the p_box
diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index b744409..215a585 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -978,7 +978,7 @@ error:
 
     if( p_sys->p_root )
     {
-        MP4_BoxFree( p_demux->s, p_sys->p_root );
+        MP4_BoxFree( p_sys->p_root );
     }
     free( p_sys );
     return VLC_EGENERIC;
@@ -1730,7 +1730,7 @@ static void Close ( vlc_object_t * p_this )
 
     msg_Dbg( p_demux, "freeing all memory" );
 
-    MP4_BoxFree( p_demux->s, p_sys->p_root );
+    MP4_BoxFree( p_sys->p_root );
     for( i_track = 0; i_track < p_sys->i_tracks; i_track++ )
     {
         MP4_TrackDestroy( p_demux, &p_sys->track[i_track] );
@@ -3918,7 +3918,7 @@ static int MP4_frg_GetChunks( demux_t *p_demux, const unsigned i_tk_id )
         uint32_t tid = 0;
         if( i_type == ATOM_uuid || i_type == ATOM_ftyp )
         {
-            MP4_BoxFree( p_demux->s, p_sys->p_root );
+            MP4_BoxFree( p_sys->p_root );
             p_sys->p_root = p_chunk;
 
             if( i_type == ATOM_ftyp ) /* DASH */
@@ -3954,7 +3954,7 @@ static int MP4_frg_GetChunks( demux_t *p_demux, const unsigned i_tk_id )
         if( MP4_frg_GetChunk( p_demux, p_chunk, &tid ) != VLC_SUCCESS )
             goto MP4_frg_GetChunks_Error;
 
-        MP4_BoxFree( p_demux->s, p_chunk );
+        MP4_BoxFree( p_chunk );
 
         if( tid == i_tk_id )
             break;
@@ -3962,7 +3962,7 @@ static int MP4_frg_GetChunks( demux_t *p_demux, const unsigned i_tk_id )
             continue;
 
 MP4_frg_GetChunks_Error:
-        MP4_BoxFree( p_demux->s, p_chunk );
+        MP4_BoxFree( p_chunk );
         return VLC_EGENERIC;
     }
 
@@ -5247,7 +5247,7 @@ static int DemuxAsLeaf( demux_t *p_demux )
 
                 if(!p_fragbox)
                 {
-                    MP4_BoxFree( p_demux->s, p_vroot );
+                    MP4_BoxFree( p_vroot );
                     msg_Err(p_demux, "no moof or moov in current chunk");
                     return 1;
                 }
@@ -5291,7 +5291,7 @@ static int DemuxAsLeaf( demux_t *p_demux )
                         p_vroot->p_first = p_cur->p_next;
                         p_cur->p_next = NULL;
                         msg_Dbg(p_demux, "ignoring box %4.4s", (char*)&p_cur->i_type);
-                        MP4_BoxFree( p_demux->s, p_cur );
+                        MP4_BoxFree( p_cur );
                     }
                 }
                 p_fragbox->p_next = NULL;
@@ -5302,7 +5302,7 @@ static int DemuxAsLeaf( demux_t *p_demux )
                 /* Append to root */
                 p_sys->p_root->p_last->p_next = p_fragbox;
                 p_sys->p_root->p_last = p_fragbox;
-                MP4_BoxFree( p_demux->s, p_vroot );
+                MP4_BoxFree( p_vroot );
             }
             else
             {
diff --git a/modules/stream_filter/smooth/downloader.c b/modules/stream_filter/smooth/downloader.c
index 13e97ed..8513c5b 100644
--- a/modules/stream_filter/smooth/downloader.c
+++ b/modules/stream_filter/smooth/downloader.c
@@ -310,7 +310,7 @@ static int parse_chunk( stream_t *s, chunk_t *ck, sms_stream_t *sms )
     MP4_Box_t *p_box = root_box.p_first;
     while( p_box )
     {
-        MP4_BoxFree( ck_s, p_box );
+        MP4_BoxFree( p_box );
         p_box = p_box->p_next;
     }
     stream_Delete( ck_s );



More information about the vlc-commits mailing list