X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fdump.c;h=eaf87fe06137c153e2bb8881c8c8ccb57d6eaa08;hb=b18230ee8c166eddcef8592c3217b4f1c3fc33c9;hp=7ed766554bd0547b1a42439ee222b2945e60a55c;hpb=5c0dbc20fceb04ffd129983ba6717230137efec5;p=ffmpeg diff --git a/libavformat/dump.c b/libavformat/dump.c index 7ed766554bd..eaf87fe0613 100644 --- a/libavformat/dump.c +++ b/libavformat/dump.c @@ -496,7 +496,7 @@ void av_dump_format(AVFormatContext *ic, int index, av_log(NULL, AV_LOG_INFO, " Duration: "); if (ic->duration != AV_NOPTS_VALUE) { int hours, mins, secs, us; - int64_t duration = ic->duration + 5000; + int64_t duration = ic->duration + (ic->duration <= INT64_MAX - 5000 ? 5000 : 0); secs = duration / AV_TIME_BASE; us = duration % AV_TIME_BASE; mins = secs / 60;