I would venture to say that the rom that you flashed has, for lack of a better term, different parameters when it comes to the camera.
I have that issue with one of my devices, where, using the stock rom after rooting, the camera is fine. However, flashing a different, custom rom makes the camera act a little wonky.
It could be a bug in the custom rom, known or unknown. Does the changelog for the custom rom address the possible camera issue?