With the reference counting stuff, the AVFrame structure is gone or unreachable by the time the release function is called.