The timecode is a long long, but it is computed as a product whose
all multiplicands are (unsigned) ints and so effectively has the value
of an (unsigned) int. Fix this, and use the full long long range,
by explicitly making one of the first two multiplicands a long long.
Found by Coverity Scan.
ass_msg(library, MSGL_WARN, "Bad timestamp");
return 0;
}
- tm = ((h * 60 + m) * 60 + s) * 1000 + ms * 10;
+ tm = ((h * 60LL + m) * 60 + s) * 1000 + ms * 10;
return tm;
}