cisco/openh264 — pull request #382 by mstorsjo (2014-03-02 21:54:34+00:00)
Title: Avoid overflow when populating a struct timespec

When adding the (dwMilliseconds % 1000) * 1000000 part
to ts.tv_nsec, the ts.tv_nsec field can grow larger than one
whole second. Therefore first add all of dwMilliseconds to
the tv_nsec field and add all whole seconds to the tv_sec
field instead - this way we make sure that the tv_nsec field
actually is less than a second.