A cheesy hack for this is to call ff_rate_control_uninit, reset your new rate, and then call ff_rate_control_init. Then at least rate control will start with a clean slate- Otherwise looking in the two above functions might be a good place to start. Tom