Add casts when converting from int64_t or double to int32_t

This fixes warnings when building with MSVC.

Review at https://rbcommons.com/s/OpenH264/r/970/.