diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-02-04 22:38:31 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-02-04 22:38:56 +0300 |
commit | 363a044b4c8223cb7bace020e31a3f2f7e3475a6 (patch) | |
tree | 1165de26791de642cbc87d7312366919304c2f24 /source/blender/editors | |
parent | 035d14c029d688e21382df978e7379f990c1d653 (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')
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 7 |
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) { |