Using a more modern method of allocating and deallocating AVFrames.
Does not fix our random crash. I'm still looking into that.