[Libav-user] avformat_find_stream_info() leaking memory

Daneel V daneelveloper at gmail.com
Wed May 5 00:57:44 EEST 2021


I'm experiencing memory leaking from avformat_find_stream_info() 
function. I'm working with regular H264 video files.

Please allow me to simplify my code as this (platform is Win64):

fmt_ctx = avformat_alloc_context();
avformat_open_input(&fmt_ctx, filename_str, NULL, NULL);
avformat_find_stream_info(fmt_ctx, NULL);

Every time that sequence rolls, there is a memory leak of 300 - 600Kb 
when all memory resources freeing is expected.
Using avformat_free_context() does not help either.

I've read about some similar cases regarding avformat_find_stream_info() 
memory leaks but all my research has been inconclusive.

     Thank you.

More information about the Libav-user mailing list