Inconsistent types for bitstream serial number
Different types are used in different places to store an Ogg bitstream serial number: at least int, long, and ogg_uint32_t. The use of int may cause incorrect behavior in environments where int is 16 bits, and the mix of signed and unsigned types is the root cause of issue 1838.
I can see a couple of approaches here:
-
Unify everything to "long", and replace the hack in Tremor that mixed 32-bit and 64-bit values with a separate flag variable (which IMHO would be a good idea in any case).
-
Unify everything to "ogg_int32_t". This would probably be significantly more invasive, and would break binary compatibility for the ogg_stream_state structure in environments with 64-bit longs. I don't currently know enough about the Ogg/Vorbis code to say whether the latter point is a problem in practice.