[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [28901] branches/render25/source/blender/ imbuf/intern/anim.c: ffmpeg was computing the frame length of avis via doubles,
Joseph Eagar
joeedh at gmail.com
Fri May 21 10:55:56 CEST 2010
Revision: 28901
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=28901
Author: joeedh
Date: 2010-05-21 10:55:56 +0200 (Fri, 21 May 2010)
Log Message:
-----------
ffmpeg was computing the frame length of avis via doubles,
but was not properly ceiling them, sometimes resulting in truncation errors.
Modified Paths:
--------------
branches/render25/source/blender/imbuf/intern/anim.c
Modified: branches/render25/source/blender/imbuf/intern/anim.c
===================================================================
--- branches/render25/source/blender/imbuf/intern/anim.c 2010-05-21 04:44:23 UTC (rev 28900)
+++ branches/render25/source/blender/imbuf/intern/anim.c 2010-05-21 08:55:56 UTC (rev 28901)
@@ -588,9 +588,9 @@
anim->duration = pFormatCtx->duration * pCodecCtx->frame_rate
/ pCodecCtx->frame_rate_base / AV_TIME_BASE;
#else
- anim->duration = pFormatCtx->duration
+ anim->duration = ceil(pFormatCtx->duration
* av_q2d(pFormatCtx->streams[videoStream]->r_frame_rate)
- / AV_TIME_BASE;
+ / AV_TIME_BASE);
#endif
anim->params = 0;
More information about the Bf-blender-cvs
mailing list