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:
authorBastien Montagne <montagne29@wanadoo.fr>2018-01-26 16:59:16 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-01-26 16:59:16 +0300
commitc528b9b7777322c2b714aaa0bec40a1f3997ad06 (patch)
tree832a5a919bbced71521827ffa13029721897683b /source/blender/imbuf/intern/IMB_anim.h
parent009ce8f3f411f4d9de4f0287f8aaba34fa4fc718 (diff)
Fix T53003: IMB: Invalid framerate handling due to short integer overflow.
FFMPEG uses int for the numerator, while Blender uses a short. So in cases people gave weird exotic framerate values and we cannot reduce enough the numerator, we'd get totally weird values (even negative frame rates sometimes!) Now we add checks for short overflow and approximate as best as possible in that case (error should not matter unless you have shots of at least several hundreds of hours ;) ).
Diffstat (limited to 'source/blender/imbuf/intern/IMB_anim.h')
-rw-r--r--source/blender/imbuf/intern/IMB_anim.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/imbuf/intern/IMB_anim.h b/source/blender/imbuf/intern/IMB_anim.h
index b10ae4f6fe9..c4c4f4405a5 100644
--- a/source/blender/imbuf/intern/IMB_anim.h
+++ b/source/blender/imbuf/intern/IMB_anim.h
@@ -99,8 +99,8 @@ struct anim {
int curtype;
int curposition; /* index 0 = 1e, 1 = 2e, enz. */
int duration;
- short frs_sec;
- float frs_sec_base;
+ int frs_sec;
+ double frs_sec_base;
int x, y;
/* for number */