Commit 6992b0bf authored by Michael Niedermayer's avatar Michael Niedermayer

utils: fix rounding of micro seconds

Found-by: 's avatarJohan Wessfeldt <johan.wessfeldt@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 3a34ac65
......@@ -3354,8 +3354,9 @@ void av_dump_format(AVFormatContext *ic,
av_log(NULL, AV_LOG_INFO, " Duration: ");
if (ic->duration != AV_NOPTS_VALUE) {
int hours, mins, secs, us;
secs = ic->duration / AV_TIME_BASE;
us = ic->duration % AV_TIME_BASE;
int64_t duration = ic->duration + 5000;
secs = duration / AV_TIME_BASE;
us = duration % AV_TIME_BASE;
mins = secs / 60;
secs %= 60;
hours = mins / 60;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment