Memory leak in MP3AudioFormat and WindowsMediaFormat?


In my little audio player, I noticed that, when playing an MP3 or a WMA file, the Windows Task Manager shows the memory usage increases at a somewhat constant speed (a couple hundred KB per second). It does not happen when playing WAV or FLAC files. Any idea?

This is what’s in the audio loop.

AudioSourceChannelInfo info;
info.buffer = &buffer;
info.numSamples = numSamples ;
info.startSample = 0;

if(currentAudioFileSource) {
// process buffer

Ah… How embarrassing… Looks like DirectShow was expecting me to free the buffer object that it returned…

Thanks for the heads-up! Try it now.