Skip to content

Commit

Permalink
Raise EOFError at the end of a video stream
Browse files Browse the repository at this point in the history
  • Loading branch information
m-decoster committed Feb 22, 2024
1 parent 976fc38 commit 0f0157d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ def intrinsics_matrix(self) -> CameraIntrinsicsMatrixType:

def _grab_images(self) -> None:
ret, image = self.video_capture.read()
if not ret:
raise RuntimeError("Can't receive frame (stream end?). Exiting...")
if not ret: # When streaming a video, we will at some point reach the end.
raise EOFError("Can't receive frame (stream end?). Exiting...")

self._frame = image

Expand Down

0 comments on commit 0f0157d

Please sign in to comment.