From 9b0fef1c389749e1ef9982ad0aa00321a9c54d9e Mon Sep 17 00:00:00 2001 From: arch1t3cht Date: Sun, 19 May 2024 21:31:28 +0200 Subject: [PATCH] vapoursynth: Fix division by zero in aegisub_vs.py progress indicator --- automation/vapoursynth/aegisub_vs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automation/vapoursynth/aegisub_vs.py b/automation/vapoursynth/aegisub_vs.py index dc354df03c..7de104ddcb 100644 --- a/automation/vapoursynth/aegisub_vs.py +++ b/automation/vapoursynth/aegisub_vs.py @@ -236,7 +236,7 @@ def _cb(n: int, f: vs.VideoFrame) -> vs.VideoFrame: nonlocal done keyframes[n] = f.props._SceneChangePrev if use_scxvid else f.props.Scenechange # type: ignore done += 1 - if done % (clip.num_frames // 200) == 0: + if done % max(1, clip.num_frames // 200) == 0: progress_set_progress(100 * done / clip.num_frames) return f