[FFmpeg-devel] Memory leaks using x265 encoder
Oliver Collyer
ovcollyer at mac.com
Wed Jan 2 11:58:08 EET 2019
Hello
So this time I'm reporting some potential memory leaks in the x265 encoder. There are a few hundred following a short encode session, but all seem to have the same call stack as below but varying allocation sizes.
I am calling avcodec_open2() to open the encoder and then avcodec_free_context() to clean it up afterwards, as per the documentation.
My code is built against the latest from https://github.com/ShiftMediaProject/FFmpeg <https://github.com/ShiftMediaProject/FFmpeg> <https://github.com/ShiftMediaProject/FFmpeg <https://github.com/ShiftMediaProject/FFmpeg>> and I'm using Visual Leak Detector to detect the leaks.
Or would this be better posted in whatever mailing list x265 development uses?
Regards
Oliver
---------- Block 63379 at 0x000000008CC3A370: 262225 bytes ----------
Leak Hash: 0x95CBF73D, Count: 15, Total 3933375 bytes
Call Stack:
ucrtbased.dll!aligned_malloc()
emu-server.exe!x265::x265_malloc() + 0x48 bytes
emu-server.exe!x265::BitCost::setQP() + 0x9A bytes
emu-server.exe!x265::Search::setLambdaFromQP() + 0xF8 bytes
emu-server.exe!x265::Analysis::compressIntraCU() + 0x87E bytes
emu-server.exe!x265::Analysis::compressCTU() + 0xC8B bytes
emu-server.exe!x265::FrameEncoder::processRowEncoder() + 0xFA7 bytes
emu-server.exe!x265::FrameEncoder::processRow() + 0x128 bytes
emu-server.exe!x265::WaveFront::findJob() + 0x125 bytes
emu-server.exe!x265::WorkerThread::threadMain() + 0x18A bytes
emu-server.exe!x265::Thread::`scalar deleting destructor'() + 0x14A bytes
emu-server.exe!x265::Thread::`scalar deleting destructor'() + 0xD2 bytes
KERNEL32.DLL!BaseThreadInitThunk() + 0x14 bytes
ntdll.dll!RtlUserThreadStart() + 0x21 bytes
Data:
70 A3 C3 8C 4B 02 00 00 ED ED ED ED ED ED ED ED p...K... ........
7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 }.}.}.}. }.}.}.}.
7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 }.}.}.}. }.}.}.}.
7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 }.}.}.}. }.}.}.}.
7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 }.}.}.}. }.}.}.}.
7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 }.}.}.}. }.}.}.}.
7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 }.}.}.}. }.}.}.}.
7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 }.}.}.}. }.}.}.}.
7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 }.}.}.}. }.}.}.}.
7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 }.}.}.}. }.}.}.}.
7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 }.}.}.}. }.}.}.}.
7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 }.}.}.}. }.}.}.}.
7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 }.}.}.}. }.}.}.}.
7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 }.}.}.}. }.}.}.}.
7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 }.}.}.}. }.}.}.}.
7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 7D 01 }.}.}.}. }.}.}.}.
Visual Leak Detector detected 236 memory leaks (25197214 bytes).
More information about the ffmpeg-devel
mailing list