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.
This commit is contained in:
2019-06-17 16:32:29 +02:00
parent c83848722a
commit 495aff71ca

View File

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