<div dir="ltr"><div>I have my own simple h.264 test. Test reads YUV frames from file, encodes to h.264 frames and after decodes. Test is leaking too. I've used valgring and massif to get memory snapshots in runtime. There are two points where memory is leaking:</div>
<div><br><div><span style="font-family:arial,sans-serif;font-size:13px">->30.61% (13,777,514B) 0x1019308: av_mallocz (mem.c:93)</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">| ->21.78% (9,804,266B) 0xEAF177: av_fast_padded_malloc (utils.c:87)</span><br style="font-family:arial,sans-serif;font-size:13px">
<span style="font-family:arial,sans-serif;font-size:13px">| | ->21.78% (9,804,266B) 0xBA9845: ff_h264_decode_nal (h264.c:500)</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">| | ->21.78% (9,804,266B) 0xBC2780: decode_nal_units (h264.c:4463)</span><br style="font-family:arial,sans-serif;font-size:13px">
<span style="font-family:arial,sans-serif;font-size:13px">| | ->21.78% (9,804,266B) 0xBC3E22: decode_frame (h264.c:4811)</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">| | ->21.78% (9,804,266B) 0xE1415A: frame_worker_thread (pthread.c:390)</span><br style="font-family:arial,sans-serif;font-size:13px">
<span style="font-family:arial,sans-serif;font-size:13px">| | ->21.78% (9,804,266B) 0x86158C8: start_thread (pthread_create.c:300)</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">| | ->21.78% (9,804,266B) 0x90A686B: clone (clone.S:112)</span><br style="font-family:arial,sans-serif;font-size:13px">
<span style="font-family:arial,sans-serif;font-size:13px">| |</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">| ->03.71% (1,668,992B) in 29 places, all below massif's threshold (01.00%)</span><br style="font-family:arial,sans-serif;font-size:13px">
<span style="font-family:arial,sans-serif;font-size:13px">| |</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">| ->03.62% (1,631,488B) 0xBAB842: ff_h264_frame_start (h264.c:291)</span><br style="font-family:arial,sans-serif;font-size:13px">
<span style="font-family:arial,sans-serif;font-size:13px">| | ->03.62% (1,631,488B) 0xBC1026: decode_slice_header (h264.c:3494)</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">| | ->03.62% (1,631,488B) 0xBC2CDE: decode_nal_units (h264.c:4563)</span><br style="font-family:arial,sans-serif;font-size:13px">
<span style="font-family:arial,sans-serif;font-size:13px">| | ->03.62% (1,631,488B) 0xBC3E22: decode_frame (h264.c:4811)</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">| | ->03.62% (1,631,488B) 0xE1415A: frame_worker_thread (pthread.c:390)</span><br style="font-family:arial,sans-serif;font-size:13px">
<span style="font-family:arial,sans-serif;font-size:13px">| | ->03.62% (1,631,488B) 0x86158C8: start_thread (pthread_create.c:300)</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">| | ->03.62% (1,631,488B) 0x90A686B: clone (clone.S:112)</span><br>
</div></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div style><span style="font-family:arial,sans-serif;font-size:13px">Alexey Dorofeev</span></div></div>