I reproduced the memory leak just spilitting an mp4 file taking only the first bytes of it (let's say just before it's first packet), if I repeteadly call av_open_input_file I see the memory raising. If needed I can include such splitted file. I'm quite new to ffmpeg, maybe is there an API that clear the static memory? thanks