Skip to content

Commit

Permalink
Fixed winding-up bug
Browse files Browse the repository at this point in the history
  • Loading branch information
MarianAldenhoevel committed Aug 1, 2017
1 parent 852fa22 commit 744b72b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Binary file modified test/output/poledance.mp4
Binary file not shown.
12 changes: 9 additions & 3 deletions timewarp.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ def generateoutputframe():
# iterate through the frames
frame_index = 0
for frame in reader.nextFrame():
lastframe = frame
frame_index = frame_index + 1

if (args.verbosity >= 2) or (frame_index%100 == 0):
Expand All @@ -155,10 +156,15 @@ def generateoutputframe():
if args.verbosity >= 1:
print "Winding up buffer..."

frames.pop()
while (len(frames) > 0):
generateoutputframe()
for _ in xrange(args.delta):
frame_index = frame_index + 1

if (args.verbosity >= 2) or (frame_index%100 == 0):
print "Processing frame #{0}...".format(frame_index)

frames.append(lastframe)
frames.pop(0)
generateoutputframe()

finally:
if args.verbosity >= 1:
Expand Down

0 comments on commit 744b72b

Please sign in to comment.