Skip to content

Commit

Permalink
Fix bug in scroll FX (#1591)
Browse files Browse the repository at this point in the history
* Scroll fix
  • Loading branch information
ZxYuan authored May 31, 2021
1 parent 84582d9 commit ec44869
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed rotation metadata of input not being taken into account rendering VideoClips [\#577](https://github.com/Zulko/moviepy/pull/577)
- Fixed mono clips crashing when `audio_fadein` FX applied [\#1574](https://github.com/Zulko/moviepy/pull/1574)
- Fixed mono clips crashing when `audio_fadeout` FX applied [\#1578](https://github.com/Zulko/moviepy/pull/1578)
- Fixed scroll FX not being scrolling [\#1591](https://github.com/Zulko/moviepy/pull/1591)


## [v2.0.0.dev2](https://github.com/zulko/moviepy/tree/v2.0.0.dev2) (2020-10-05)
Expand Down
4 changes: 2 additions & 2 deletions moviepy/video/fx/scroll.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ def scroll(
if w is None:
w = clip.w

x_max = clip.w - w - 1
y_max = clip.h - h - 1
x_max = w - 1
y_max = h - 1

def filter(get_frame, t):
x = int(max(0, min(x_max, x_start + round(x_speed * t))))
Expand Down

0 comments on commit ec44869

Please sign in to comment.