title: does ffmpeg allocate memory and will not release immediately when encoding and decoding?
body: <p>i want to transform videos to jpeg and wav as output. I wrote the programm by myself with FFmpeg-api. The video(.webm e.g.) is decoded and video and audio frames are encoded to jpeg and wav. With running of the program, more and more videos are converted but more and more rss are used(top cmd in linux).</p>
  <p>I have also used valgrind to test if there is memory leak. And there is None.</p>
  <p>The rss increases not linear and like follows(just example):</p>
  <p>1 video: 30m
  2 video: 150m
  3 video: 200m
  4 video: 220m
  5 video: 220m
  6 video: 230m</p>
  <p>The programm run in docker container and k8s with memory limit(2G). After days(about 30000 videos are processed for example) the pod will be force restarted.</p>
  <p>Is it real memory leak? Or these memory are keeped by ffmpeg lib as memory pool or something?
  Thanks</p>