Skip to content

Commit 3a7c1fa

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 fc5ebee commit 3a7c1fa

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

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

0 commit comments

Comments
 (0)