frameencoder: explicit size conversion to avoid MSVC warning