avformat/utils: avoid overflow in compute_chapters_end()  with huge durations

Fixes: usan_granule_overflow

Found-by: Thomas Guilbert <tguilbert@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
