Many functions returned an int to indicate their success. For clarity, use SDL_bool instead.
A condition variable was init for the "struct frames", but was never destroyed.
Start a new clean history from here.