Skip to content

Commit 97ad476

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 1c813b6 commit 97ad476

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
@@ -461,9 +461,10 @@ def _writer_loop(self) -> None:
461461

462462
if hasattr(timestamp_metadata, "to_frame_dict"):
463463
record["hardware_timestamp"] = timestamp_metadata.to_frame_dict()
464-
default_value = timestamp_metadata.get_default_reported()
465-
if default_value is not None:
466-
record["hardware_timestamp_default"] = default_value
464+
if hasattr(timestamp_metadata, "get_default_reported"):
465+
default_value = timestamp_metadata.get_default_reported()
466+
if default_value is not None:
467+
record["hardware_timestamp_default"] = default_value
467468
elif isinstance(timestamp_metadata, dict):
468469
record["hardware_timestamp"] = dict(timestamp_metadata)
469470
else:

0 commit comments

Comments
 (0)