Skip to content

Commit

Permalink
Only export timestamps if at least one frame was written
Browse files Browse the repository at this point in the history
  • Loading branch information
papr committed Nov 4, 2019
1 parent 5c269fa commit 8259067
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pupil_src/shared_modules/av_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,9 @@ def close(self, timestamp_export_format="npy"):
self.container.close()
self.closed = True

if timestamp_export_format is not None:
if self.configured and timestamp_export_format is not None:
# Requires self.container to be closed since we extract pts
# from the exported video file.
write_timestamps(
self.output_file_path, self.timestamps, timestamp_export_format
)
Expand Down

0 comments on commit 8259067

Please sign in to comment.