Skip to content

Commit

Permalink
fixed hold for large values
Browse files Browse the repository at this point in the history
  • Loading branch information
WyattBoothe committed Feb 28, 2021
1 parent 8a9a000 commit dd96af0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion auto_editor/cutting.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ def applyZooms(cmdZooms, audioData, sampleRate, fps, log):
inter = ms[6]

if(len(ms) > 7):
hold = int(ms[7])
hold = ms[7]

if(len(ms) > 8):
log.error('Too many comma arguments for zoom option.')
Expand Down
6 changes: 4 additions & 2 deletions auto_editor/renderVideo.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,13 @@ def values(val, log, _type, totalFrames, width, height):
z[0] = values(z[0], log, int, totalFrames, width, height)
z[1] = values(z[1], log, int, totalFrames, width, height)

if(z[7] is None):
if(z[7] is not None): # hold value
z[7] = values(z[7], log, int, totalFrames, width, height)

if(z[7] is None or z[7] > z[1]):
zoom_sheet[z[0]:z[1]] = interpolate(z[2], z[3], z[1] - z[0], log,
method=z[6])
else:
z[7] = values(z[7], log, int, totalFrames, width, height)
zoom_sheet[z[0]:z[0]+z[7]] = interpolate(z[2], z[3], z[7], log,
method=z[6])
zoom_sheet[z[0]+z[7]:z[1]] = z[3]
Expand Down

0 comments on commit dd96af0

Please sign in to comment.