fix a bug where the last cut would be dropped

This commit is contained in:
rolux 2013-07-26 15:34:42 +02:00
parent 212f1feaef
commit ea24ff6e25
1 changed files with 3 additions and 4 deletions

View File

@ -662,12 +662,11 @@ class Timelines():
if self.render_antialias:
self._save_full_tile('antialias')
if self.cuts_path:
# remove cuts at max_cut_len
self.cuts = filter(lambda x: x not in self.no_cuts, self.cuts)
# remove cuts at first frame and last frame and all cuts at max_cut_len
self.cuts = filter(lambda x: x not in [0, self.frame_n] + self.no_cuts, self.cuts)
with open(self.cuts_path, 'w') as f:
# remove 0 and frame_n from cuts
# avoid float rounding artefacts
f.write('[' + ', '.join(map(lambda x: '%.2f' % (x / FPS), self.cuts[1:-1])) + ']')
f.write('[' + ', '.join(map(lambda x: '%.2f' % (x / FPS), self.cuts)) + ']')
if self.render_audio:
self._render_audio(self.volume)
if not self.render_video: