              self.check_thread_error()
              if self.disk_io.completion_event.is_set():
                  break
          pool.join()
  
          logger.debug("Putting EOF")
          save_queue.put("EOF")
          logger.debug("Converted images")
 
</s> remove             sleep(1)
 </s> add  </s> remove             retval = int(self.vid_cap.get(cv2.CAP_PROP_FRAME_COUNT))  # pylint: disable=no-member
 </s> add             retval = int(im_ffm.count_frames_and_secs(self.folder)[0])
                logger.debug("DiskIO completion event set. Joining Pool")
                break
            try:
                completed = completion_queue.get(True, 1)
            except QueueEmpty:
                continue
            completed_count += completed
            logger.debug("Total process pools completed: %s of %s", completed_count, pool.procs)
            if completed_count == pool.procs:
                logger.debug("All processes completed. Joining Pool")
              self.check_thread_error()
              if self.disk_io.completion_event.is_set():
                logger.debug("DiskIO completion event set. Joining Pool")
                break
            try:
                completed = completion_queue.get(True, 1)
            except QueueEmpty:
                continue
            completed_count += completed
            logger.debug("Total process pools completed: %s of %s", completed_count, pool.procs)
            if completed_count == pool.procs:
                logger.debug("All processes completed. Joining Pool")
                  break
          pool.join()
  
          logger.debug("Putting EOF")
          save_queue.put("EOF")
          logger.debug("Converted images")
keep add keep keep keep keep keep keep
 bugfix: Stop convert hanging at the last few frames on some input videos 
scripts/convert.py