My intention is to create a relatively simple video playback system to be used in a larger program that I am working on. Relevant code to the video decoder is here. The best I have been able to do so far is narrow down the memory leak to this section of code (or rather I have not noticed any memory leaks occurring when video is not used).
This is probably a very broad question how ever I am unsure of the scope of the issue I am having and as such of how to word my question.
What I want to know is what have I missed or done wrong that has lead to a noticeable memory leak (by noticeable I mean I can watch memory usage climb megabytes per minute). I have tried ensured that every allocation that I make is matched by a deallocation.
EDIT 1
This is to be built on a Windows 10 machine running MSYS2 (MinGW64)