Add casts when converting pointer differences to integers

This fixes warnings when building with MSVC in 64 bit mode.

Review at https://rbcommons.com/s/OpenH264/r/946/.