From 6c733713f98ca9c47ecf6cb4061eb5d00527d45c Mon Sep 17 00:00:00 2001 From: Gildas Bazin Date: Thu, 9 Dec 2004 14:06:36 +0000 Subject: [PATCH 1/1] * modules/packetizer/mpeg4video.c: fixed memory leak (patch by Sau). --- modules/packetizer/mpeg4video.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/packetizer/mpeg4video.c b/modules/packetizer/mpeg4video.c index a400910d98..809a9b7271 100644 --- a/modules/packetizer/mpeg4video.c +++ b/modules/packetizer/mpeg4video.c @@ -232,7 +232,8 @@ static block_t *Packetize( decoder_t *p_dec, block_t **pp_block ) { /* Copy the complete VOL */ p_dec->fmt_out.i_extra = p_start - p_vol; - p_dec->fmt_out.p_extra = malloc( p_dec->fmt_out.i_extra ); + p_dec->fmt_out.p_extra = + realloc( p_dec->fmt_out.p_extra, p_dec->fmt_out.i_extra ); memcpy( p_dec->fmt_out.p_extra, p_vol, p_dec->fmt_out.i_extra ); m4v_VOLParse( &p_dec->fmt_out, p_dec->fmt_out.p_extra, p_dec->fmt_out.i_extra ); @@ -497,6 +498,3 @@ static int m4v_VOLParse( es_format_t *fmt, uint8_t *p_vol, int i_vol ) } return VLC_SUCCESS; } - - - -- 2.39.2