memory leak in muxing.c
|Reported by:||blinky0815||Owned by:|
|Blocking:||Reproduced by developer:||no|
|Analyzed by developer:||no|
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.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.3 LTS
gcc (Ubuntu 4.9.2-0ubuntu1~14.04) 4.9.2
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.