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:
authorAntony Riakiotakis <kalast@gmail.com>2015-02-04 22:38:31 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-02-04 22:38:56 +0300
commit363a044b4c8223cb7bace020e31a3f2f7e3475a6 (patch)
tree1165de26791de642cbc87d7312366919304c2f24 /source/blender/editors/screen
parent035d14c029d688e21382df978e7379f990c1d653 (diff)
Sequencer, scaling and audio synch
Don't scale proxies, same as we do in gooseberry, also for sound synch give a small window around sound where frame is just pushed forward. Avoids video jumping in the cases when video renders faster than sound (yes, weirdly enough it happens sometimes). There might be a few jumps but results looks smoother here.
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r--source/blender/editors/screen/screen_ops.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index 1990216aa30..6b75d21163a 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -3387,7 +3387,12 @@ static int screen_animation_step(bContext *C, wmOperator *UNUSED(op), const wmEv
(sad->flag & ANIMPLAY_FLAG_REVERSE) == false &&
finite(time = sound_sync_scene(scene)))
{
- scene->r.cfra = (double)time * FPS + 0.5;
+ double newfra = (double)time * FPS;
+ /* give some space here to avoid jumps */
+ if (newfra + 0.5 > scene->r.cfra && newfra - 0.5 < scene->r.cfra)
+ scene->r.cfra++;
+ else
+ scene->r.cfra = newfra + 0.5;
}
else {
if (sync) {