Skip to content

Commit 084437b

Browse files
committed
Fix one-frame offset when reading videos
1 parent ab18f50 commit 084437b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/napari_deeplabcut/_reader.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ def height(self):
251251

252252
def set_to_frame(self, ind):
253253
ind = min(ind, len(self) - 1)
254+
ind += 1 # Unclear why this is needed at all
254255
self.stream.set(cv2.CAP_PROP_POS_FRAMES, ind)
255256

256257
def read_frame(self):

0 commit comments

Comments
 (0)