[vlc-commits] avformat mux: fix leaks
Rafaël Carré
git at videolan.org
Fri Dec 9 03:20:41 CET 2011
vlc | branch: master | Rafaël Carré <funman at videolan.org> | Thu Dec 8 21:10:14 2011 -0500| [d824a709ccd875ffa022ac6bd675d8561c64f0bd] | committer: Rafaël Carré
avformat mux: fix leaks
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d824a709ccd875ffa022ac6bd675d8561c64f0bd
---
modules/demux/avformat/mux.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c
index 9c87073..d1449ec 100644
--- a/modules/demux/avformat/mux.c
+++ b/modules/demux/avformat/mux.c
@@ -101,6 +101,7 @@ int OpenMux( vlc_object_t *p_this )
#else
file_oformat = guess_format( psz_mux, NULL, NULL );
#endif
+ free( psz_mux );
}
else
{
@@ -178,13 +179,16 @@ void CloseMux( vlc_object_t *p_this )
msg_Err( p_mux, "could not write trailer" );
}
+ /* XXX : use avformat_free_context() */
for( i = 0 ; i < p_sys->oc->nb_streams; i++ )
{
if( p_sys->oc->streams[i]->codec->extradata )
av_free( p_sys->oc->streams[i]->codec->extradata );
av_free( p_sys->oc->streams[i]->codec );
+ av_free( p_sys->oc->streams[i]->info );
av_free( p_sys->oc->streams[i] );
}
+ av_free( p_sys->oc->streams );
av_free( p_sys->oc );
free( p_sys->io_buffer );
More information about the vlc-commits
mailing list