h264: factor out setting the parameter sets for a frame