From e19e29481c02b8bf657b6e7cbc2676bf41909229 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 8 Aug 2011 19:02:18 +0000 Subject: [PATCH] Camera tracking integration =========================== Next attempt to fix MSVC compilation. I wish i've got my laptop by hand.. --- source/blender/imbuf/intern/anim_movie.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c index f93dc4bf873..b3accba82ef 100644 --- a/source/blender/imbuf/intern/anim_movie.c +++ b/source/blender/imbuf/intern/anim_movie.c @@ -76,6 +76,8 @@ #include "BKE_global.h" #include "BKE_depsgraph.h" +#include "BLI_math_base.h" + #include "imbuf.h" #include "AVI_avi.h" @@ -1014,7 +1016,7 @@ static ImBuf * ffmpeg_fetchibuf(struct anim * anim, int position, tc_index, new_frame_index); } else { pts_to_search = (long long) - rint(((double) position) / pts_time_base / frame_rate); + floor(((double) position) / pts_time_base / frame_rate + 0.5); if (st_time != AV_NOPTS_VALUE) { pts_to_search += st_time / pts_time_base