x264: Factor out the reconfiguration code