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:
authorSergey Sharybin <sergey.vfx@gmail.com>2019-06-17 17:32:29 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-06-17 17:35:36 +0300
commit495aff71ca81c77d2384dd13f5d24039ab2f9458 (patch)
tree8d45621a31d4926e2600854948a99125938a0cc2
parentc83848722a5c99bebe8ee3b8f363f633e08c2960 (diff)
Fix frame jump with AV-sync enabled
It was possible to have animation player step happening after manual jump prior to the dependency graph evaluation. Now we forbid changing scene frame if it was manually requested to be changed.
-rw-r--r--source/blender/editors/screen/screen_ops.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index e9f3a3fc12a..f6034a7051e 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -4230,8 +4230,12 @@ static int screen_animation_step(bContext *C, wmOperator *UNUSED(op), const wmEv
sync = (scene->flag & SCE_FRAME_DROP);
}
- if ((scene->audio.flag & AUDIO_SYNC) && (sad->flag & ANIMPLAY_FLAG_REVERSE) == false &&
- isfinite(time = BKE_sound_sync_scene(scene_eval))) {
+ if (scene_eval->id.recalc & ID_RECALC_AUDIO_SEEK) {
+ /* Ignore seek here, the audio will be updated to the scene frame after jump during next
+ * dependency graph update. */
+ }
+ else if ((scene->audio.flag & AUDIO_SYNC) && (sad->flag & ANIMPLAY_FLAG_REVERSE) == false &&
+ isfinite(time = BKE_sound_sync_scene(scene_eval))) {
double newfra = (double)time * FPS;
/* give some space here to avoid jumps */