[Bf-blender-cvs] [495aff71ca8] master: Fix frame jump with AV-sync enabled

Sergey Sharybin noreply at git.blender.org
Mon Jun 17 16:35:38 CEST 2019


Commit: 495aff71ca81c77d2384dd13f5d24039ab2f9458
Author: Sergey Sharybin
Date:   Mon Jun 17 16:32:29 2019 +0200
Branches: master
https://developer.blender.org/rB495aff71ca81c77d2384dd13f5d24039ab2f9458

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.

===================================================================

M	source/blender/editors/screen/screen_ops.c

===================================================================

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 */



More information about the Bf-blender-cvs mailing list