Camera tracking integration
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 8 Aug 2011 19:02:18 +0000 (19:02 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 8 Aug 2011 19:02:18 +0000 (19:02 +0000)
===========================

Next attempt to fix MSVC compilation.

I wish i've got my laptop by hand..

source/blender/imbuf/intern/anim_movie.c

index f93dc4bf8736e13cf62eca381416129b1410e945..b3accba82ef15fe766daf00545d3e01fb149d8ea 100644 (file)
@@ -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