<div dir="ltr">Hello everyone,<div><br></div><div>I know there are millions of threads/mails about this, but none have similar cases.</div><div><br></div><div>OS - Ubuntu 14.04.2 LTS and all libav devel pkges are Â 6:9.18-0ubuntu0.14.04.1+fdkaac version.</div><div><br></div><div><div>ffmpeg version N-75912-g624057d Copyright (c) 2000-2015 the FFmpeg developers</div><div>  built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04)</div><div>  configuration: --enable-libx264 --enable-gpl</div><div>  libavutil Â  Â  Â 55. Â 3.100 / 55. Â 3.100</div><div>  libavcodec Â  Â  57. Â 5.100 / 57. Â 5.100</div><div>  libavformat Â  Â 57. Â 3.100 / 57. Â 3.100</div><div>  libavdevice Â  Â 57. Â 0.100 / 57. Â 0.100</div><div>  libavfilter Â  Â  6. 11.100 / Â 6. 11.100</div><div>  libswscale Â  Â  Â 4. Â 0.100 / Â 4. Â 0.100</div><div>  libswresample Â  2. Â 0.100 / Â 2. Â 0.100</div><div>  libpostproc Â  Â 54. Â 0.100 / 54. Â 0.100</div></div><div><br></div><div>Sample code:</div><div><a href="http://pastebin.com/kbRmrjpe">http://pastebin.com/kbRmrjpe</a></div><div><br></div><div>I tried both av_frame_unref and av_frame_free after decoding frame and in case of free I call av_frame_alloc() again;</div><div><br></div><div>No matter what I try call to avcodec_decode_video2 results in memory leak.</div><div>One distinguishing factor from normal cases is that the input stream is quite large.</div><div><br></div><div>Any help or ideas are appreciated,</div><div>Thanks in advance.</div><div><br></div></div>