Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/imbuf/intern/anim_movie.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c
index d378ca9a78c..a40b257b75b 100644
--- a/source/blender/imbuf/intern/anim_movie.c
+++ b/source/blender/imbuf/intern/anim_movie.c
@@ -522,9 +522,9 @@ static int startffmpeg(struct anim *anim)
anim->duration = pFormatCtx->streams[videoStream]->nb_frames;
}
else {
- anim->duration = ceil(pFormatCtx->duration *
- av_q2d(frame_rate) /
- AV_TIME_BASE);
+ anim->duration = (int)(pFormatCtx->duration *
+ av_q2d(frame_rate) /
+ AV_TIME_BASE + 0.5f);
}
frs_num = frame_rate.num;