[FFmpeg-trac] #4937(undetermined:new): memory leak in muxing.c
FFmpeg
trac at avcodec.org
Fri Oct 16 13:34:36 CEST 2015
#4937: memory leak in muxing.c
-------------------------------------+-------------------------------------
Reporter: blinky0815 | Type: defect
Status: new | Priority: critical
Component: | Version: git-
undetermined | master
Keywords: memory leak | Blocked By:
in muxing.c | Reproduced by developer: 0
Blocking: |
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
**Summary of the bug:**
This is a tiny but very nasty memory leak and is only noticeable when
encoding/muxing a large video.
I first noticed it when encoding/muxing a webcam video and sound for more
than two hours, hence the 7200 seconds. My program eventually ran out of
memory because of this issue.
Since this is an important example other programmers rely on in order to
write their own code, it's critical. At least very important.
//At first, I assumed a bug in my own code, but the issue can be easily
reproduced by using the '''muxing.c''' example.//
**How to reproduce:**
1: Edit the source of muxing.c and set the duration to 7200 seconds.
Really, any long duration will do. The longer, the better.
2: Set the FPS to 30. The more frames per second, the faster the memory
gets eaten away.
3: **Optional:** comment the code in log_packet or disable logging.
4: compile using make or PKG_CONFIG_PATH=pc-uninstalled make
4: start with ./muxing test.mkv
5: open top and watch the bytes disappear.
**My System:**
Distributor ID: Ubuntu
Description: Ubuntu 14.04.3 LTS
Release: 14.04
Codename: trusty
**Compiler:**
gcc (Ubuntu 4.9.2-0ubuntu1~14.04) 4.9.2
**Kernel:**
3.13.0-65-generic
//I know someone already posted a memory leak issue regarding muxing.c
back in 2013, but the information given was brief and a bit inconclusive
to say the least.//
--
Ticket URL: <https://trac.ffmpeg.org/ticket/4937>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list