[vlc-commits] demux: mp4: missing es cleanup
Francois Cartegnie
git at videolan.org
Wed Jun 10 18:58:01 CEST 2015
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Jun 3 22:35:12 2015 +0200| [835c81d0de210d4d3c4a77218df8135c545e59c9] | committer: Francois Cartegnie
demux: mp4: missing es cleanup
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=835c81d0de210d4d3c4a77218df8135c545e59c9
---
modules/demux/mp4/mp4.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index 620be39..f07b021 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -117,7 +117,7 @@ struct demux_sys_t
*****************************************************************************/
static void MP4_TrackCreate ( demux_t *, mp4_track_t *, MP4_Box_t *, bool b_force_enable );
static int MP4_frg_TrackCreate( demux_t *, mp4_track_t *, MP4_Box_t *);
-static void MP4_TrackDestroy( mp4_track_t * );
+static void MP4_TrackDestroy( demux_t *, mp4_track_t * );
static block_t * MP4_Block_Read( demux_t *, const mp4_track_t *, int );
static void MP4_Block_Send( demux_t *, mp4_track_t *, block_t * );
@@ -1714,7 +1714,7 @@ static void Close ( vlc_object_t * p_this )
MP4_BoxFree( p_demux->s, p_sys->p_root );
for( i_track = 0; i_track < p_sys->i_tracks; i_track++ )
{
- MP4_TrackDestroy( &p_sys->track[i_track] );
+ MP4_TrackDestroy( p_demux, &p_sys->track[i_track] );
}
FREENULL( p_sys->track );
@@ -2902,7 +2902,7 @@ static void FreeAndResetChunk( mp4_chunk_t *ck )
****************************************************************************
* Destroy a track created by MP4_TrackCreate.
****************************************************************************/
-static void MP4_TrackDestroy( mp4_track_t *p_track )
+static void MP4_TrackDestroy( demux_t *p_demux, mp4_track_t *p_track )
{
unsigned int i_chunk;
@@ -2912,6 +2912,9 @@ static void MP4_TrackDestroy( mp4_track_t *p_track )
es_format_Clean( &p_track->fmt );
+ if( p_track->p_es )
+ es_out_Del( p_demux->out, p_track->p_es );
+
for( i_chunk = 0; i_chunk < p_track->i_chunk_count; i_chunk++ )
{
if( p_track->chunk )
More information about the vlc-commits
mailing list