Skip to content

Commit 3e34e7b

Browse files
C-AchardCopilot
andauthored
Guard default timestamp field
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 9f84a58 commit 3e34e7b

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

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

0 commit comments

Comments
 (0)