Commit 6ad32e53 authored by Francois Cartegnie's avatar Francois Cartegnie

demux: mp4: remove unused param in MP4_Free

parent 89c26f35
...@@ -35,7 +35,7 @@ AtomsReader::~AtomsReader() ...@@ -35,7 +35,7 @@ AtomsReader::~AtomsReader()
while(rootbox && rootbox->p_first) while(rootbox && rootbox->p_first)
{ {
MP4_Box_t *p_next = rootbox->p_first->p_next; 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; rootbox->p_first = p_next;
} }
delete rootbox; delete rootbox;
......
...@@ -234,7 +234,7 @@ static MP4_Box_t *MP4_ReadBoxRestricted( stream_t *p_stream, MP4_Box_t *p_father ...@@ -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 ) 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 ); 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; return NULL;
} }
...@@ -4046,7 +4046,7 @@ static MP4_Box_t *MP4_ReadBox( stream_t *p_stream, MP4_Box_t *p_father ) ...@@ -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 ) 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; 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 */ MP4_Seek( p_stream, i_end ); /* Skip the failed box */
return NULL; return NULL;
} }
...@@ -4058,7 +4058,7 @@ static MP4_Box_t *MP4_ReadBox( stream_t *p_stream, MP4_Box_t *p_father ) ...@@ -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 * MP4_FreeBox : free memory after read with MP4_ReadBox and all
* the children * 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; MP4_Box_t *p_child;
...@@ -4070,7 +4070,7 @@ void MP4_BoxFree( stream_t *s, MP4_Box_t *p_box ) ...@@ -4070,7 +4070,7 @@ void MP4_BoxFree( stream_t *s, MP4_Box_t *p_box )
MP4_Box_t *p_next; MP4_Box_t *p_next;
p_next = p_child->p_next; p_next = p_child->p_next;
MP4_BoxFree( s, p_child ); MP4_BoxFree( p_child );
p_child = p_next; p_child = p_next;
} }
...@@ -4247,7 +4247,7 @@ MP4_Box_t *MP4_BoxGetRoot( stream_t *p_stream ) ...@@ -4247,7 +4247,7 @@ MP4_Box_t *MP4_BoxGetRoot( stream_t *p_stream )
return p_root; return p_root;
error: error:
free( p_root ); free( p_vroot );
MP4_Seek( p_stream, 0 ); MP4_Seek( p_stream, 0 );
return NULL; return NULL;
} }
......
...@@ -1675,7 +1675,7 @@ MP4_Box_t *MP4_BoxGetRoot( stream_t * ); ...@@ -1675,7 +1675,7 @@ MP4_Box_t *MP4_BoxGetRoot( stream_t * );
* XXX : all children have to be allocated by a malloc !! and * XXX : all children have to be allocated by a malloc !! and
* p_box is freed * 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 * MP4_DumpBoxStructure: print the structure of the p_box
......
...@@ -978,7 +978,7 @@ error: ...@@ -978,7 +978,7 @@ error:
if( p_sys->p_root ) if( p_sys->p_root )
{ {
MP4_BoxFree( p_demux->s, p_sys->p_root ); MP4_BoxFree( p_sys->p_root );
} }
free( p_sys ); free( p_sys );
return VLC_EGENERIC; return VLC_EGENERIC;
...@@ -1730,7 +1730,7 @@ static void Close ( vlc_object_t * p_this ) ...@@ -1730,7 +1730,7 @@ static void Close ( vlc_object_t * p_this )
msg_Dbg( p_demux, "freeing all memory" ); 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++ ) for( i_track = 0; i_track < p_sys->i_tracks; i_track++ )
{ {
MP4_TrackDestroy( p_demux, &p_sys->track[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 ) ...@@ -3918,7 +3918,7 @@ static int MP4_frg_GetChunks( demux_t *p_demux, const unsigned i_tk_id )
uint32_t tid = 0; uint32_t tid = 0;
if( i_type == ATOM_uuid || i_type == ATOM_ftyp ) 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; p_sys->p_root = p_chunk;
if( i_type == ATOM_ftyp ) /* DASH */ if( i_type == ATOM_ftyp ) /* DASH */
...@@ -3954,7 +3954,7 @@ static int MP4_frg_GetChunks( demux_t *p_demux, const unsigned i_tk_id ) ...@@ -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 ) if( MP4_frg_GetChunk( p_demux, p_chunk, &tid ) != VLC_SUCCESS )
goto MP4_frg_GetChunks_Error; goto MP4_frg_GetChunks_Error;
MP4_BoxFree( p_demux->s, p_chunk ); MP4_BoxFree( p_chunk );
if( tid == i_tk_id ) if( tid == i_tk_id )
break; break;
...@@ -3962,7 +3962,7 @@ static int MP4_frg_GetChunks( demux_t *p_demux, const unsigned i_tk_id ) ...@@ -3962,7 +3962,7 @@ static int MP4_frg_GetChunks( demux_t *p_demux, const unsigned i_tk_id )
continue; continue;
MP4_frg_GetChunks_Error: MP4_frg_GetChunks_Error:
MP4_BoxFree( p_demux->s, p_chunk ); MP4_BoxFree( p_chunk );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
...@@ -5247,7 +5247,7 @@ static int DemuxAsLeaf( demux_t *p_demux ) ...@@ -5247,7 +5247,7 @@ static int DemuxAsLeaf( demux_t *p_demux )
if(!p_fragbox) 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"); msg_Err(p_demux, "no moof or moov in current chunk");
return 1; return 1;
} }
...@@ -5291,7 +5291,7 @@ static int DemuxAsLeaf( demux_t *p_demux ) ...@@ -5291,7 +5291,7 @@ static int DemuxAsLeaf( demux_t *p_demux )
p_vroot->p_first = p_cur->p_next; p_vroot->p_first = p_cur->p_next;
p_cur->p_next = NULL; p_cur->p_next = NULL;
msg_Dbg(p_demux, "ignoring box %4.4s", (char*)&p_cur->i_type); 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; p_fragbox->p_next = NULL;
...@@ -5302,7 +5302,7 @@ static int DemuxAsLeaf( demux_t *p_demux ) ...@@ -5302,7 +5302,7 @@ static int DemuxAsLeaf( demux_t *p_demux )
/* Append to root */ /* Append to root */
p_sys->p_root->p_last->p_next = p_fragbox; p_sys->p_root->p_last->p_next = p_fragbox;
p_sys->p_root->p_last = p_fragbox; p_sys->p_root->p_last = p_fragbox;
MP4_BoxFree( p_demux->s, p_vroot ); MP4_BoxFree( p_vroot );
} }
else else
{ {
......
...@@ -310,7 +310,7 @@ static int parse_chunk( stream_t *s, chunk_t *ck, sms_stream_t *sms ) ...@@ -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; MP4_Box_t *p_box = root_box.p_first;
while( p_box ) while( p_box )
{ {
MP4_BoxFree( ck_s, p_box ); MP4_BoxFree( p_box );
p_box = p_box->p_next; p_box = p_box->p_next;
} }
stream_Delete( ck_s ); stream_Delete( ck_s );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment