Skip to content

Commit c62f335

Browse files
committed
Fixing regression on Preview dialog which froze all playback
1 parent 4575062 commit c62f335

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/windows/cutting.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,12 @@ def __init__(self, file=None, preview=False):
9595
self.lblInstructions.setVisible(False)
9696
self.widgetControls.setVisible(False)
9797
self.setWindowTitle(_("Preview"))
98-
self.start_frame = round(file.data.get("start", 0) * self.fps) + 1
99-
self.end_frame = round(file.data.get("end", 0) * self.fps)
100-
self.video_length = (self.end_frame - self.start_frame) + 1
98+
99+
if float(file.data.get("start", 0.0)) > 0.0:
100+
self.start_frame = round(file.data.get("start", 0) * self.fps) + 1
101+
if float(file.data.get("end", 0.0)) > 0.0:
102+
self.end_frame = round(file.data.get("end", 0) * self.fps)
103+
self.video_length = (self.end_frame - self.start_frame) + 1
101104

102105
# Open video file with Reader
103106
log.info(self.file_path)

0 commit comments

Comments
 (0)