<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>