[Ffmpeg-devel] Re: Memory leak in output_example ... ?

Burkhard Plaum plaum
Thu Sep 22 15:46:09 CEST 2005


Hi,

> ==10241== 65552 bytes in 2 blocks are still reachable in loss record 2 of 2
> ==10241==    at 0x1B905141: memalign (vg_replace_malloc.c:216)
> ==10241==    by 0x80A8BAE: av_malloc (mem.c:62)
> ==10241==    by 0x80A6F56: av_mallocz (utils.c:63)
> ==10241==    by 0x80B498B: MPV_encode_defaults (mpegvideo.c:596)
> ==10241==    by 0x80AA939: MPV_encode_init (mpegvideo.c:893)
> ==10241==    by 0x81C485F: encode_init (mpeg12.c:224)
> ==10241==    by 0x80A7663: avcodec_open (utils.c:832)
> ==10241==    by 0x80546A0: open_video (output_example.c:262)
> ==10241==    by 0x8054EB1: main (output_example.c:465)

If the av_mallocz() in mpegvideo.c:596 is replaced by av_mallocz_static(),
this leak should go away (it's one of those leaks, which are harmless for static
linking but serious in shared libs). Not sure about the other one.

Cheers

Burkhard





More information about the ffmpeg-devel mailing list