Skip to content

Commit e576e6f

Browse files
C-AchardCopilot
andcommitted
Guard default timestamp field
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent fc1890c commit e576e6f

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎dlclivegui/services/video_recorder.py‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -455,9 +455,10 @@ def _writer_loop(self) -> None:
455455

456456
if hasattr(timestamp_metadata, "to_frame_dict"):
457457
record["hardware_timestamp"] = timestamp_metadata.to_frame_dict()
458-
default_value = timestamp_metadata.get_default_reported()
459-
if default_value is not None:
460-
record["hardware_timestamp_default"] = default_value
458+
if hasattr(timestamp_metadata, "get_default_reported"):
459+
default_value = timestamp_metadata.get_default_reported()
460+
if default_value is not None:
461+
record["hardware_timestamp_default"] = default_value
461462
elif isinstance(timestamp_metadata, dict):
462463
record["hardware_timestamp"] = dict(timestamp_metadata)
463464
else:

0 commit comments

Comments
 (0)