AMF0 obj_writer is unconditionally incrementing its reference index for every single property value it writes, including primitives. In AMF0, the reference table should only store complex objects.
See https://ossrs.net/lts/zh-cn/assets/files/amf0_spec_121207-ac97fd4db9408706cd816b681ca3918c.pdf 2.9 Reference Type
I have found this issue to frequently pop up when trying to write tests for Ruffle, as the spec seems accurate.
AMF0 obj_writer is unconditionally incrementing its reference index for every single property value it writes, including primitives. In AMF0, the reference table should only store complex objects.
See https://ossrs.net/lts/zh-cn/assets/files/amf0_spec_121207-ac97fd4db9408706cd816b681ca3918c.pdf 2.9 Reference Type
I have found this issue to frequently pop up when trying to write tests for Ruffle, as the spec seems accurate.