[FFmpeg-devel] [PATCH] libavcodec vc1dec memory leak fix
Kostya
kostya.shishkov
Wed Feb 24 05:49:08 CET 2010
On Wed, Feb 24, 2010 at 12:42:15AM +0200, Alper Akcan wrote:
> hi,
>
> memory leak in livavcodec/vc1dec.c, the problem is MPV_commont_init()
> is called twice from vc1_decode_init()
>
> 1- vc1_decode_init() [ libavcodec/vc1dec.c:2977 ]
> ff_h263_decode_init() [ libavcodec/vc1dec.c:2997 ]
> MPV_commont_init() [ libavcodec/h263dec.c::115 ]
> lots of allocz ... [ libavcodec/mpegvideo.c:444-644 ]
>
> 2- vc1_decode_init() [ libavcodec/vc1dec.c:2977 ]
> ff_msmpeg4_decode_init() [ libavcodec/vc1dec.c:3001 ]
> ff_h263_decode_init() [ libavcodec/msmpeg4.c:1282 ]
> MPV_commont_init() [ libavcodec/h263dec.c::115 ]
> lots of allocz ... [ libavcodec/mpegvideo.c:444-644 ]
>
> which causes at least 1 mb of mem leak.
>
> I am attaching two possible fixes.
>
> 1- deleting first call for ff_263_decode_init() in vc1_decode_init() function.
> 2- doing MPV_common_end, before in the very beginning of
> MPV_common_init() which will free prev allocz.
>
> I do not know which one is better for ffmpeg.
Thank you very much for information, I'll resolve it.
> cheers,
> alper akcan.
More information about the ffmpeg-devel
mailing list