[vlc-devel] commit: Fixed memleaks in ps demuxer (close #3141). (Laurent Aimar )
git version control
git at videolan.org
Sun Jan 31 01:41:55 CET 2010
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sat Jan 30 21:27:22 2010 +0100| [fc0fc2753491e5a2283579023b5221b89a71b393] | committer: Laurent Aimar
Fixed memleaks in ps demuxer (close #3141).
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fc0fc2753491e5a2283579023b5221b89a71b393
---
modules/demux/ps.h | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/modules/demux/ps.h b/modules/demux/ps.h
index 457276e..ae778d6 100644
--- a/modules/demux/ps.h
+++ b/modules/demux/ps.h
@@ -674,9 +674,15 @@ static inline int ps_psm_fill( ps_psm_t *p_psm, block_t *p_pkt,
if( ps_track_fill( &tk_tmp, p_psm, tk[i].i_id ) != VLC_SUCCESS )
continue;
- if( tk_tmp.fmt.i_codec == tk[i].fmt.i_codec ) continue;
+ if( tk_tmp.fmt.i_codec == tk[i].fmt.i_codec )
+ {
+ es_format_Clean( &tk_tmp.fmt );
+ continue;
+ }
es_out_Del( out, tk[i].es );
+ es_format_Clean( &tk[i].fmt );
+
tk[i] = tk_tmp;
tk[i].b_seen = true;
tk[i].es = es_out_Add( out, &tk[i].fmt );
More information about the vlc-devel
mailing list