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:
Sergey Sharybin 2019-06-17 16:32:29 +02:00
parent c83848722a
commit 495aff71ca
Notes: blender-bot 2023-02-14 10:18:56 +01:00
Referenced by commit f8a70db556, Fix T67047: Can't jump to frame when using jack in A/V sync mode
Referenced by issue #65881, Can't scrobble playhead during playback in animation editors if FPS is slow
1 changed files with 6 additions and 2 deletions

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