diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-06-22 22:18:42 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-06-22 22:18:42 +0400 |
commit | 86de9694ff03225ce04608e568583fd702138f58 (patch) | |
tree | 26a251cf1e1bad7390bf02a7a6ff22d69fa64554 /source/blender/imbuf/intern/anim.c | |
parent | c28aec9ae11c4b68406cf74fa9ac228886cdb376 (diff) |
ffmpeg was computing the frame length of avis via doubles, but was
not properly ceiling them, sometimes resulting in truncation errors.
(merge from render25 branch, commit with revision 28901 by Joe)
Diffstat (limited to 'source/blender/imbuf/intern/anim.c')
-rw-r--r-- | source/blender/imbuf/intern/anim.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/imbuf/intern/anim.c b/source/blender/imbuf/intern/anim.c index 2cb63b7274c..bfc3433875d 100644 --- a/source/blender/imbuf/intern/anim.c +++ b/source/blender/imbuf/intern/anim.c @@ -589,9 +589,9 @@ static int startffmpeg(struct anim * anim) { 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; |