Skip to content

Commit

Permalink
Correct variable name in progress bar (#1514)
Browse files Browse the repository at this point in the history
* Correct variable name in progress bar

The progress bar is using "t" to represent what is actually a frame index, making it confusing for people implementing custom progress bars.

This is not retro-compatible for people who have already implemented a custom progress bar since the "t" was introduced, so it would be for a v2.0.
  • Loading branch information
Zulko committed Apr 5, 2021
1 parent 5a63b64 commit 0dcb3ee
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion moviepy/Clip.py
Expand Up @@ -439,7 +439,9 @@ def iter_frames(self, fps=None, with_times=False, logger=None, dtype=None):
for frame in myclip.iter_frames()])
"""
logger = proglog.default_bar_logger(logger)
for frame_index in logger.iter_bar(t=np.arange(0, int(self.duration * fps))):
for frame_index in logger.iter_bar(
frame_index=np.arange(0, int(self.duration * fps))
):
# int is used to ensure that floating point errors are rounded
# down to the nearest integer
t = frame_index / fps
Expand Down

0 comments on commit 0dcb3ee

Please sign in to comment.