diff --git a/libavformat/mccdec.c b/libavformat/mccdec.c index 874ff45cdf..2a0b7905a0 100644 --- a/libavformat/mccdec.c +++ b/libavformat/mccdec.c @@ -142,7 +142,7 @@ static int mcc_read_header(AVFormatContext *s) if (av_sscanf(line, "%d:%d:%d:%d", &hh, &mm, &ss, &fs) != 4) continue; - ts = av_rescale(hh * 3600LL + mm * 60LL + ss, rate.num, rate.den) + fs; + ts = av_sat_add64(av_rescale(hh * 3600LL + mm * 60LL + ss, rate.num, rate.den), fs); lline = (char *)&line; lline += 12;