Skip to content

Commit

Permalink
fix(#82): resize the video length after load_frames
Browse files Browse the repository at this point in the history
  • Loading branch information
williamfzc committed Dec 17, 2019
1 parent 9ef6a3d commit 1817cb7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions stagesepx/video.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ def load_frames(self):

# lock the order
self.data = tuple(data)
# fix the length ( the last frame may be broken sometimes )
self.frame_count = len(data)

def _read_from_file(self) -> typing.Generator[VideoFrame, None, None]:
with toolbox.video_capture(self.path) as cap:
Expand Down

0 comments on commit 1817cb7

Please sign in to comment.