FFmpeg now requires that frames allocated with avcodec_alloc_frame are freed with avcodec_free_frame.