I'm currently using avio_close_dyn_buf to grab the data out of an AVIOContext object into uint8_t * buffer. Once I am done using the data, I try to free the buffer with av_free(buffer), but the memory doesn't get freed. Over time, my program runs out of memory and crashes. Can anyone help shed some light?