Fix AV-sync sometimes putting scene one frame back
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 17 Jun 2019 15:52:02 +0000 (17:52 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 17 Jun 2019 15:52:02 +0000 (17:52 +0200)
source/blender/editors/screen/screen_ops.c

index f6034a7..1a146f5 100644 (file)
@@ -4243,7 +4243,7 @@ static int screen_animation_step(bContext *C, wmOperator *UNUSED(op), const wmEv
         scene->r.cfra++;
       }
       else {
-        scene->r.cfra = newfra + 0.5;
+        scene->r.cfra = max_ii(scene->r.cfra, newfra + 0.5);
       }
 
 #ifdef PROFILE_AUDIO_SYNCH