[MPlayer-cvslog] r23612 - trunk/libmpdemux/demuxer.c
reimar
subversion at mplayerhq.hu
Sat Jun 23 19:39:27 CEST 2007
Author: reimar
Date: Sat Jun 23 19:39:27 2007
New Revision: 23612
Log:
Fix memleak due to not freeing demuxer->s_streams
Modified:
trunk/libmpdemux/demuxer.c
Modified: trunk/libmpdemux/demuxer.c
==============================================================================
--- trunk/libmpdemux/demuxer.c (original)
+++ trunk/libmpdemux/demuxer.c Sat Jun 23 19:39:27 2007
@@ -226,6 +226,11 @@ sh_sub_t *new_sh_sub_sid(demuxer_t *demu
return demuxer->s_streams[id];
}
+void free_sh_sub(sh_sub_t *sh) {
+ mp_msg(MSGT_DEMUXER, MSGL_DBG2, "DEMUXER: freeing sh_sub at %p\n", sh);
+ free(sh);
+}
+
sh_audio_t* new_sh_audio_aid(demuxer_t *demuxer,int id,int aid){
if(id > MAX_A_STREAMS-1 || id < 0)
{
@@ -296,6 +301,8 @@ void free_demuxer(demuxer_t *demuxer){
if(demuxer->a_streams[i]) free_sh_audio(demuxer, i);
for(i = 0; i < MAX_V_STREAMS; i++)
if(demuxer->v_streams[i]) free_sh_video(demuxer->v_streams[i]);
+ for(i = 0; i < MAX_S_STREAMS; i++)
+ if(demuxer->s_streams[i]) free_sh_sub(demuxer->s_streams[i]);
// free demuxers:
free_demuxer_stream(demuxer->audio);
free_demuxer_stream(demuxer->video);
More information about the MPlayer-cvslog
mailing list