From 4bb27e5e8cef253770d0f8c617777f808cfbc747 Mon Sep 17 00:00:00 2001 From: Skyler Lehmkuhl Date: Tue, 14 Jan 2025 17:36:35 -0500 Subject: [PATCH] Restore frame number after exporting --- src/main.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.js b/src/main.js index 96cb31c..542f40b 100644 --- a/src/main.js +++ b/src/main.js @@ -5220,6 +5220,7 @@ async function render() { const oldContext = context; context = exportContext; + const oldRootFrame = root.currentFrameNum let currentFrame = 0; const bitrate = 1e6 const frameTimeMicroseconds = parseInt(1_000_000 / config.framerate) @@ -5302,6 +5303,7 @@ async function render() { } else { // Once all frames are processed, reset context and export context = oldContext; + root.setFrameNum(oldRootFrame) finishEncoding() } };