[Ffmpeg-devel] Memory leaks with some codecs... (again)
Mat
heavensdoor78
Fri Feb 3 10:47:06 CET 2006
Hi all...
Some months ago I posted a message (and a small patch) for some memory
leaks...
I did the same test again on the current CVS version (debugger:
valgrind) and I see that they are there again.
I think it could be useful to correct them... :)
I don't know If the changes I proposed the last time are corrects (
av_mallocz -> av_mallocz_static ).
If someone can tell me something it will be very appreciated...
Greetings,
-Mat-
=== Mpeg4 ===
valgrind --leak-check=yes --show-reachable=yes --log-file=valgrind.log
./output_example test.avi
==3114== Memcheck, a memory error detector for x86-linux.
==3114== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al.
==3114== Using valgrind-2.4.0, a program supervision framework for
x86-linux.
==3114== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al.
==3114==
==3114== My PID = 3114, parent PID = 1249. Prog and args are:
==3114== ./output_example
==3114== test.avi
==3114== For more details, rerun with: -v
==3114==
==3114==
==3114== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 17 from 1)
==3114== malloc/free: in use at exit: 67112 bytes in 4 blocks.
==3114== malloc/free: 135 allocs, 131 frees, 1781315 bytes allocated.
==3114== For counts of detected errors, rerun with: -v
==3114== searching for pointers to 4 not-freed blocks.
==3114== checked 618512 bytes.
==3114==
==3114== 1560 bytes in 2 blocks are definitely lost in loss record 1 of 2
==3114== at 0x1B905141: memalign (vg_replace_malloc.c:216)
==3114== by 0x80ABB8E: av_malloc (mem.c:62)
==3114== by 0x80AB364: avcodec_alloc_context (utils.c:803)
==3114== by 0x80597C1: av_new_stream (utils.c:2194)
==3114== by 0x8054B0C: add_video_stream (output_example.c:187)
==3114== by 0x805490E: main (output_example.c:447)
==3114==
==3114==
==3114== 65552 bytes in 2 blocks are still reachable in loss record 2 of 2
==3114== at 0x1B905141: memalign (vg_replace_malloc.c:216)
==3114== by 0x80ABB8E: av_malloc (mem.c:62)
==3114== by 0x80A9E26: av_mallocz (utils.c:63)
==3114== by 0x80B7BFB: MPV_encode_defaults (mpegvideo.c:596)
==3114== by 0x80AD959: MPV_encode_init (mpegvideo.c:894)
==3114== by 0x80AA643: avcodec_open (utils.c:867)
==3114== by 0x8054C70: open_video (output_example.c:262)
==3114== by 0x80544F1: main (output_example.c:465)
==3114==
==3114== LEAK SUMMARY:
==3114== definitely lost: 1560 bytes in 2 blocks.
==3114== possibly lost: 0 bytes in 0 blocks.
==3114== still reachable: 65552 bytes in 2 blocks.
==3114== suppressed: 0 bytes in 0 blocks.
More information about the ffmpeg-devel
mailing list