X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fjacosubdec.c;h=121c86d659687ecd224711e429af6a488826261c;hb=1a944563907b0a8dc1aa9231dc42d8fc8eeb2de4;hp=50144f7e214be82766e18cf1ecec7361bd1a2603;hpb=e427ba5c68a522b26a45bf7c61016d9349fab43d;p=ffmpeg diff --git a/libavformat/jacosubdec.c b/libavformat/jacosubdec.c index 50144f7e214..121c86d6596 100644 --- a/libavformat/jacosubdec.c +++ b/libavformat/jacosubdec.c @@ -107,6 +107,7 @@ static const char *read_ts(JACOsubContext *jacosub, const char *buf, unsigned hs, ms, ss, fs; // hours, minutes, seconds, frame start unsigned he, me, se, fe; // hours, minutes, seconds, frame end int ts_start, ts_end; + int64_t ts_start64, ts_end64; /* timed format */ if (sscanf(buf, "%u:%u:%u.%u %u:%u:%u.%u %n", @@ -124,10 +125,10 @@ static const char *read_ts(JACOsubContext *jacosub, const char *buf, return NULL; shift_and_ret: - ts_start = (ts_start + jacosub->shift) * 100 / jacosub->timeres; - ts_end = (ts_end + jacosub->shift) * 100 / jacosub->timeres; - *start = ts_start; - *duration = ts_end - ts_start; + ts_start64 = (ts_start + jacosub->shift) * 100LL / jacosub->timeres; + ts_end64 = (ts_end + jacosub->shift) * 100LL / jacosub->timeres; + *start = ts_start64; + *duration = ts_end64 - ts_start64; return buf + len; }