fileReadThread(): check return of read()

git-svn-id: http://moon:8086/svn/software/trunk/projects/opencv@328 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
2016-10-19 17:56:15 +00:00
parent 2fcc544491
commit 52747ba516
+1
View File
@@ -80,6 +80,7 @@ class VideoSource(RgbProcessorAdapter):
cap = cv2.VideoCapture(self.fileName)
while not self.cancel:
ret, frame = cap.read()
if ret:
self.write(frame)
time.sleep(1.0/self.framerate)