Set number of reference frames in SPS to 1 as fix for newer firmwares using new bitstream replacement code
Don't create new byte array when replacing bits if possible